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

Implement semantic tokens (for highlighting) #1186

Closed
wants to merge 26 commits into from
Closed

Implement semantic tokens (for highlighting) #1186

wants to merge 26 commits into from

Conversation

FelipeLema
Copy link

Fixes #847
pick up from #961

For every PR, please check the following:

@FelipeLema FelipeLema marked this pull request as draft October 28, 2022 13:52
@FelipeLema FelipeLema marked this pull request as ready for review October 28, 2022 20:06
@FelipeLema
Copy link
Author

that's weird... I thought I added the last missing for TextDocumentClientCapabilities for semanticTokens::Union{SemanticTokensClientCapabilities,Missing}

can we trigger CI for this again?

@FelipeLema FelipeLema marked this pull request as draft November 28, 2022 15:01
@PhilippPolterauer
Copy link

I would love to use this feature. Is there anyway to assist in the development?
Or maybe test it for functionality?

@FelipeLema
Copy link
Author

the skeleton is there and it works, although it needs to be polished. Namely, the column-row indices seem to be off, but I haven't had time to pin the bug: I can see some coloring that has the row-col off, but I'm having trouble reproducing them as a minimum working example for unit tests. The bugfix should be easy, probably just a +1 or -1 missing somewhere... the trouble is reproducing the error.

If you've setup your IDE manually (neovim, emacs... anything but VSCode), then it should be fairly easy to point to this code and try it out:
1- clone my repo locally
2- checkout the semantic-tokens-847
3- point the setup code / script to the repo you cloned

one thing that can also be worked on is adding matching cases to semantic_token_kind(), specially leveraging external_env::StaticLint.ExternalEnv for semantic context. For example, you can add the case and return an "Argument" token by copying the code for the static lint rule for "unused argument".

I'd recommend using tests for working on semantic_token_kind()

@FelipeLema FelipeLema closed this by deleting the head repository Aug 22, 2023
@caleb-allen
Copy link

@FelipeLema was this functionality completed elsewhere?

@FelipeLema
Copy link
Author

@caleb-allen "semantic tokens for julia language server"? not that I know of
"semantic tokens for any language"? clangd & sumneko lua

@caleb-allen
Copy link

@FelipeLema what was the reason for closing this PR?

@FelipeLema
Copy link
Author

@caleb-allen I don't see myself finishing it in the near future. I tried squeezing some time the last few weeks, but no dice.

@caleb-allen
Copy link

@FelipeLema I'm interested in picking up where you left off, however I hit a 404 when I try to access the repo you linked above https://github.com/FelipeLema/LanguageServer.jl

Are you willing to share your latest work so that I could potentially pick it up?

@FelipeLema
Copy link
Author

oh, I deleted that repo recently (that probably auto-closed this PR)

I've re-uploaded the semantic-tokens-847 branch to https://codeberg.org/FelipeLema/LanguageServer.jl

@caleb-allen
Copy link

@FelipeLema I see. Thanks for re-uploading it!

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.

Support for Semantic highlight/token
3 participants