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

Add support for textDocument/documentHighlight request #308

Merged
merged 2 commits into from
Jun 4, 2024

Conversation

rapgenic
Copy link
Contributor

@rapgenic rapgenic commented Jun 3, 2024

Hi, thank you all for the great project, which has helped me a lot while writing VHDL code!

In most of the other language servers, I use a lot the documentHighlight feature, which highlights all the occurrences of a symbol in the current file. Noticing that it was missing from this LS I attempted my own implementation

See the result here:

Video.del.2024-06-04.00-08-52.mp4

Edit

It seems that VScode has some kind of fallback that performs the same result even if the server does not have this capability! (I am actually using another editor - Zed - that would not do the same)

See the before and after in Zed:

Before

Video.del.2024-06-04.00-20-05.mp4

After

Video.del.2024-06-04.00-19-45.mp4

Copy link
Contributor

@Schottkyc137 Schottkyc137 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for contributing!
This looks good to me so far. I have only added one comment which you can either ignore or implement; the choice is up to you.
If you want to ignore it, just mark the conversation as resolved and I will merge your changes.

vhdl_ls/src/vhdl_server.rs Show resolved Hide resolved
@rapgenic
Copy link
Contributor Author

rapgenic commented Jun 4, 2024

What about something like this? I have tried it and it seems to perform actually faster!

@Schottkyc137
Copy link
Contributor

What about something like this? I have tried it and it seems to perform actually faster!

Very nice, that's exactly what I had in mind.

@Schottkyc137 Schottkyc137 merged commit 21c51b3 into VHDL-LS:master Jun 4, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants