30
submitted 8 months ago by xigoi@lemmy.sdf.org to c/neovim@programming.dev
you are viewing a single comment's thread
view the rest of the comments
[-] matcha_addict@lemy.lol 4 points 8 months ago

I love the idea of less-automatic pairs.

I wish there was a plugin that keeps track of unclosed pairs, but instead of inserting them automatically, it just reminds you of them and their order.

For some reason, inserting pairs automatically disorients me a bit.

[-] xigoi@lemmy.sdf.org 1 points 8 months ago

That’s an interesting idea. How exactly would you imagine it to work?

[-] matcha_addict@lemy.lol 1 points 8 months ago

There's a couple of ways I can see it:

  • highlights unclosed pairs
  • closing pairs shown as faded / gray text, kind of like some auto complete systems like copilot in vscode.
  • it could be some key bind you press, and it closes the next unclosed pair

The following is less preferred but still works: maybe the status line or a pop up shows the order of unclosed pairs.

[-] xigoi@lemmy.sdf.org 1 points 8 months ago

I think all of those suggestions are feasible. However, what should the plugin do in situations when a delimiter is deliberately left unclosed, such as character literals? I wouldn’t want it to permanently suggest the corresponding closing delimiter.

this post was submitted on 14 Mar 2024
30 points (100.0% liked)

Neovim

2185 readers
1 users here now

founded 1 year ago
MODERATORS