Skip to content

[6.0] Translate the semantic token legend used by clangd to the semantic token legend used by SourceKit-LSP #1527

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

Merged

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Jun 27, 2024

ahoppen added 2 commits June 27, 2024 05:30
…ken legend used by SourceKit-LSP

clangd uses a completely different semantic token legend than SourceKit-LSP (it doesn’t even adhere to the ordering of the pre-defined token types) but we were passing index offsets from clangd through assuming that clangd uses the same legend, which was incorrect.

When retrieving semantic tokens from clangd, translate the semantic tokens from clangd’s legend to SourceKit-LSP’s legend.

rdar://129895062
@ahoppen ahoppen requested a review from bnbarham June 27, 2024 03:32
@ahoppen
Copy link
Member Author

ahoppen commented Jun 27, 2024

@swift-ci Please test

@ahoppen ahoppen merged commit 970a755 into swiftlang:release/6.0 Jun 27, 2024
3 checks passed
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.

2 participants