-
Notifications
You must be signed in to change notification settings - Fork 51
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
Support for semantic highlighting #47
Comments
I have already started implementing the proposal. Building our own version is directly against the entire purpose of LSP as it would only work with Nim-aware LSP clients. I know that at least the Vim language server has implemented the proposed version. |
The community seems to still be debating whether that's the right way to implement semantic highlighting. So I'm just proposing a way for us to have this function before the semantic highlighting extension for LSP is finalized. |
I think the only thing possibly up for discussion (might be in part my fault 😱 ) is the token edits part, which is optional and skipped by various real-world LSP servers anyway. If any of you got input on this though, head over and jump in: microsoft/language-server-protocol#18 |
I figured the basics were already fairly agreed upon as editors like Vim have already started adding support for it. This is the PR I'm using as my reference for what I'm implementing, which should be the same as what is supported in Vim: https://github.com/microsoft/vscode-languageserver-node/pull/367/files |
@PMunch are you still working on this? |
I haven't abandoned it if that is what you're asking. But I haven't actively worked on it for a while. |
nimsuggest
already has powerful highlighting capability via thehighlight
command. I'd like to see this exposed via the LSP interface.The current proposal for semantic highlighting in LSP (microsoft/language-server-protocol#18) doesn't seem to reach a conclusion yet, so I'd propose that we implement a server-specific method for this (maybe
nimlsp/semanticHighlight
?, I'm not sure how vendor-specific methods are done).For simplicity we just need an array containing these information for a given file:
SymbolKind
here)The upcoming major version of neovim will feature a scriptable LSP interface that I can use to do custom queries like this, allowing me to deprecate the current
nimsuggest
processing code innim.nvim
.The text was updated successfully, but these errors were encountered: