Repository navigation
fix: Support semantic token MultilineTokenSupport - #406
Conversation
Fixes redhat-developer#401 Signed-off-by: azerr <[email protected]>
d4f49c8 to
1d75661
Compare
|
I'm testing with tangzx.emmylua-0.8.1-darwin-arm64/server/darwin-arm64/darwin-arm64/EmmyLua.LanguageServer, but, in terms of semantic highlighting, I only see the print parameter that changes color:
I used .luax extension to avoid using the lua textmate grammar. When using .lua, the comment highlighting comes from the textmate grammar. @CppCXY what is the expected behavior? |
|
I think it is normal I suggest that you use semantic tokens inspector to see the result of lsp semantics. |
|
@fbricon if you use .lua extension yiu should see print as blue, right? Perhaps you need to declare your mapping *.luax with languageId équals to lua? |
|
See my last screenshot with the lua extension. 'print' is greyish |
In fact, I haven't implemented full semantic highlighting because VSCode's own semantic highlighting for Lua is good enough(sumneko maintain). You'd better use Luals for testing. |
|
I have even less highlighting when using LuaLS: |
|
What about semantic tokens inspector? |
|
|
OK so semantink tokens is working correctly |
|
Perhaps we should add a new texattributekeys for function+defaultLibrary? |
|
emmylua yields different tokens: |
|
I think we can merge the PR @fbricon because it fixes the original issue. We can improve defaultLibrary in another PR |
|
Thanks @angelozerr! |




fix: Support semantic token MultilineTokenSupport
Fixes #401
As IJ can support MultilineTokenSupport, this PR fill this capability and Lua language server doesn't report a large value.
Here the result:
This PR contains the first test with semantic token with this use-case. It would be very nice to create other tests in the future.
LSP4IJ ignores large values, we will see in the future if it needs to do that, but as I do not have a concrete use-case, LSP4IJ ignores it.
@CppCXY thanks so much for your great explanation!