-
Notifications
You must be signed in to change notification settings - Fork 28
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 textDocument/semanticTokens
#238
Comments
@FalsePattern , as you have already implemented I have tried to explain how to implement this LSP support inside LSP4IJ, I know you did the solution 3, but I think it should be cleaner to use an IJ extension point (see solution 1 (the best I think) or solution 2). Please note that LSP4IJ support cancelRequest which I think is very important for this LSP support. I think too we should use some LSP4E classes https://github.com/eclipse/lsp4e/tree/main/org.eclipse.lsp4e/src/org/eclipse/lsp4e/operations/semanticTokens like https://github.com/eclipse/lsp4e/blob/main/org.eclipse.lsp4e/src/org/eclipse/lsp4e/operations/semanticTokens/SemanticTokensDataStreamProcessor.java because I know that several Eclipse contributor have worked hard to omplement this feature and fixes several bugs. LSP4IJ contains too a lof tests and I have tried to write test for important features like completion, hover (see https://github.com/redhat-developer/lsp4ij/tree/main/src/test/java/com/redhat/devtools/lsp4ij/features) We should have too tests for |
@FalsePattern it seems it is a blocker issue to adopt LSP4IJ, I will try to investigate how to implement this feature in my spare time since it is not for us (Red Hat) our priority, but if you want to try to implement it, please tell me. |
Fixes redhat-developer#238 Signed-off-by: azerr <[email protected]>
Fixes redhat-developer#238 Signed-off-by: azerr <[email protected]>
Fixes redhat-developer#238 Signed-off-by: azerr <[email protected]>
Fixes redhat-developer#238 Signed-off-by: azerr <[email protected]>
Fixes redhat-developer#238 Signed-off-by: azerr <[email protected]>
Fixes redhat-developer#238 Signed-off-by: azerr <[email protected]>
Fixes redhat-developer#238 Signed-off-by: azerr <[email protected]>
Fixes redhat-developer#238 Signed-off-by: azerr <[email protected]>
Fixes redhat-developer#238 Signed-off-by: azerr <[email protected]>
Fixes redhat-developer#238 Signed-off-by: azerr <[email protected]>
Fixes redhat-developer#238 Signed-off-by: azerr <[email protected]>
Fixes redhat-developer#238 Signed-off-by: azerr <[email protected]>
Fixes redhat-developer#238 Signed-off-by: azerr <[email protected]>
Fixes redhat-developer#238 Signed-off-by: azerr <[email protected]>
Fixes redhat-developer#238 Signed-off-by: azerr <[email protected]>
Fixes redhat-developer#238 Signed-off-by: azerr <[email protected]>
Fixes redhat-developer#238 Signed-off-by: azerr <[email protected]>
Fixes redhat-developer#238 Signed-off-by: azerr <[email protected]>
Fixes redhat-developer#238 Signed-off-by: azerr <[email protected]>
Fixes redhat-developer#238 Signed-off-by: azerr <[email protected]>
Fixes redhat-developer#238 Signed-off-by: azerr <[email protected]>
Fixes redhat-developer#238 Signed-off-by: azerr <[email protected]>
Fixes redhat-developer#238 Signed-off-by: azerr <[email protected]>
Fixes redhat-developer#238 Signed-off-by: azerr <[email protected]>
@CppCXY @FalsePattern I have merged the PR and you can install https://github.com/redhat-developer/lsp4ij?tab=readme-ov-file#testing-nightly-builds to play with the experimental semantic tokens. Please read:
It is an experimental support, so don't hesitate to create any PR to improve the support, change the API, etc, thanks! |
See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_semanticTokens
To implement this LSP
textDocument/semanticTokens
support, I think we should:textDocument/semanticTokens
The implementation should use a new class
LSPSemanticTokensSupport
like we did for any LSP features, see for instancelsp4ij/src/main/java/com/redhat/devtools/lsp4ij/features/foldingRange/LSPFoldingRangeBuilder.java
Line 59 in 69f8a0c
Those class LSP*Support are registered in an LSPFileSUpport which is registered with a key in a PsiFile. It give the capability for instance to cancel the LSP request when file is closed. LSP4IJ support too LSP cancel request to cancel the LSP request when file changed or Intellij throws a ProcessCanceledException to avoid using TimeOut.
The text was updated successfully, but these errors were encountered: