-
Notifications
You must be signed in to change notification settings - Fork 262
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
v1.1 semantic highlight feature, introduced in specification 3.16.0 #788
Conversation
…n specification 3.16.0.
- add overhead code for new method - move code from "semantic tokens for full document" to "semantic tokens for range in document" - add range delimitation to function - make "full document" use "range that covers all document"
94ba2b3
to
c018bce
Compare
this is ready to be merged (deltas are not mandatory). I've tested this using Emacs+lsp-mode and it seems to work Ok. I will come back to work in deltas in a few weeks |
- Move SemanticTokens to QueryFile - Add SemanticTokensId (though still returning SemanticTokens) - Save latest SemanticTokensId in QueryFile (latest semantic token sent is associated to a file)
I just cancelled deltas because I don't see much support for it in the wild, and it looks like quite the work to do. This PR is ready to be... uhm... pulled. |
re deltas: prabirshrestha/vim-lsp#633 (comment) |
lsp-mode was complaining that generated json was not properly parsed
The biggest problem for me is that I cannot test this. Do you know how to test lsp-mode semantic tokens? I dropped the ccls-style semantic highlighting locally in emacs-ccls but cannot observe any fontlock color differences even if I have set -- i/ccls.el
+++ w/ccls.el
@@ -162,4 +162,3 @@ DIRECTION can be \"D\", \"L\", \"R\" or \"U\"."
:notification-handlers
- (lsp-ht ("$ccls/publishSkippedRanges" #'ccls--publish-skipped-ranges)
- ("$ccls/publishSemanticHighlight" #'ccls--publish-semantic-highlight))
+ (lsp-ht ("$ccls/publishSkippedRanges" #'ccls--publish-skipped-ranges))
:initialization-options (lambda () ccls-initialization-options) Please don't use The commits should better be squashed. |
"macro" | ||
}; | ||
|
||
const char * SEMANTIC_MODIFIERS[] = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-format should make it const char *SEMANTIC_MODIFIERS[] =
The preferred style is kSemanticModifiers
using namespace clang; | ||
|
||
namespace { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
single blank line
This is not good. |
will replace with something like |
I'm looking to decouple the rainbowing from the See discussion after this comment |
can anyone walk me through the "rainbowing process"? any pics / video samples of what end users will see? |
Continuation of #740 (fixed TODOs, sprinkled some
using
and lexicographical comparisons)I originally sent this as a PR to @jlahoda, but they seem to have lost interest? anyway, I'm willing to take care of this until merged to main branch
textDocument/semanticTokens/range
textDocument/semanticTokens/full
textDocument/semanticTokens/full/delta