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

Add semantic token struct and serialization #11

Merged

Conversation

koliyo
Copy link
Contributor

@koliyo koliyo commented Oct 20, 2023

Semantic tokes are encoded as an array of UInt32 in the LSP spec, which makes sense for transport efficiency. But this is not a convenient representation in the LSP server.

This changeset adds a SemanticToken representation, and encode/decode functionality to the transport representation.

It also sort the tokens during encode since the token encoding is offset based with unsigned integers, and must be ordered properly.

Semantic tokes are encoded as an array of UInt32 in the LSP spec, which makes sense for transport efficiency. But this is not a convenient representation in the LSP server.

This changeset adds a `SemanticToken` representation, and encode/decode functionality to the transport representation.

It also sort the tokens during encode since the token encoding is offset based with unsigned integers, and must be ordered properly.
@mattmassicotte mattmassicotte merged commit f701f4e into ChimeHQ:main Oct 20, 2023
3 checks passed
@mattmassicotte
Copy link
Contributor

😎

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