Skip to content
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

Highlighting the word under the main cursor automatically. #3436

Open
m-kru opened this issue Aug 15, 2022 · 7 comments · May be fixed by #6197
Open

Highlighting the word under the main cursor automatically. #3436

m-kru opened this issue Aug 15, 2022 · 7 comments · May be fixed by #6197
Labels
A-helix-term Area: Helix term improvements C-enhancement Category: Improvements

Comments

@m-kru
Copy link

m-kru commented Aug 15, 2022

Kakoune allows highlighting the word under the main cursor automatcially.

declare-option -hidden regex cursor_word
add-highlighter global/ dynregex '%opt{cursor_word}' 0:bright-white

The result is as follows:

image

Is it possible with helix?

@m-kru m-kru added the C-enhancement Category: Improvements label Aug 15, 2022
@septemhill
Copy link

Not pretty sure that could we use cursorline to fulfill this requirement

@m-kru
Copy link
Author

m-kru commented Aug 15, 2022

@septemhill please look at the screenshot one more time. ante is highlighted in 3 lines, not solely in the line with the cursor.

@the-mikedavis
Copy link
Member

This is somewhat possible with the Language Server using LSP documentHighlight #2738 which creates selections for all occurences of the symbol under the cursor. There isn't a way for those to be highlighted and not selected though and it only works for languages with Language Servers running

@the-mikedavis the-mikedavis added the A-helix-term Area: Helix term improvements label Aug 15, 2022
@m-kru
Copy link
Author

m-kru commented Aug 15, 2022

Is helix an editor for coding only? Everything is built around LSP. Sometimes you have a plain text file.

@the-mikedavis
Copy link
Member

Development focus so far has been focused on language-aware integrations like LSP, DAP or tree-sitter since that's what contributors are most interested in working on. Fallbacks for when language-aware tools are not available are within scope for the project though. If it's something important to you then it sounds like a nice opportunity to contribute. There are some open issues like #1015 although that one has some PRs already

@SoraTenshi SoraTenshi linked a pull request Mar 5, 2023 that will close this issue
3 tasks
@willhansen
Copy link

This looks adjacent to the "semantic highlighting" feature in intellij that I quite like.

Each variable gets its own color.

Would probably use much of the code required for this.

Selection_235

Selection_236

@pascalkuthe
Copy link
Member

This looks adjacent to the "semantic highlighting" feature in intellij that I quite like.

Each variable gets its own color.

Would probably use much of the code required for this.

Selection_235

Selection_236

That's unrelated and would be closer to #2857 implementation wire and would have little/nothing to do with this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-helix-term Area: Helix term improvements C-enhancement Category: Improvements
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants