Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Highlight match of pair left of the cursor in insert mode #8547

Closed
TheZoq2 opened this issue Oct 16, 2023 · 1 comment
Closed

Highlight match of pair left of the cursor in insert mode #8547

TheZoq2 opened this issue Oct 16, 2023 · 1 comment
Labels
C-enhancement Category: Improvements

Comments

@TheZoq2
Copy link
Contributor

TheZoq2 commented Oct 16, 2023

In the editors I'm used to (neovim, vscode), when in insert mode, the pair highlighting highlights the sibling of the pair to the left of the cursor when there is one, but helix seems to do the opposite.

This is probably easier to demonstrate with an example (| is the cursor)

((()|
  ^^

or

((())|
 ^  ^

Currently, helix seems to not highlight any of the parens in these situations. I find this very annoying, because I often use the pair highlighting to figure out if I need to add more parens. Here I have to guess or exit insert mode to check.

Of course, this becomes a bit ambiguous with matched parens, which neovim highlights like this,

((()|))
  ^^

but helix like

((()|))
 ^   ^

but for that to be intuitive, the highlighting needs to highlight both pairs (#8489)

@TheZoq2 TheZoq2 added the C-enhancement Category: Improvements label Oct 16, 2023
@pascalkuthe
Copy link
Member

The issue is that you viel the cursors as a bar instead of a Block. Helix used Block cursors semantica, where (even in insertmode) the cursors always has width one. So we don't highlight the brackets to the kwft of the cursors or to the right of the cursors but the bracket at the cursors.

It would be weird to apply the matching brackets highlight anywhere but the cursors itself. I don't think we will go forward with that

@helix-editor helix-editor locked and limited conversation to collaborators Oct 16, 2023
@pascalkuthe pascalkuthe converted this issue into discussion #8548 Oct 16, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
C-enhancement Category: Improvements
Projects
None yet
Development

No branches or pull requests

2 participants