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

Semantic Token Support #533

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Make the token and modifier kinds
doeke committed Mar 7, 2024
commit 7054c187166c3a4f9a243f41068f1d3c828ee0ee
44 changes: 44 additions & 0 deletions pylsp/lsp.py
Original file line number Diff line number Diff line change
@@ -86,6 +86,50 @@ class SymbolKind:
Array = 18


-1


class SemanticTokenKind:
Namespace = 0
# represents a generic type. acts as a fallback for types which
# can't be mapped to a specific type like class or enum.
Type = 1
Class = 2
Enum = 3
Interface = 4
Struct = 5
TypeParameter = 6
Parameter = 7
Variable = 8
Property = 9
EnumMember = 10
Event = 11
Function = 12
Method = 13
Macro = 14
Keyword = 15
Modifier = 16
Comment = 17
String = 18
Number = 19
Regexp = 20
Operator = 21
Decorator = 22 # @since 3.17.0


class SemanticTokenModifierKind:
Declaration = 0
Definition = 1
Readonly = 2
Static = 3
Deprecated = 4
Abstract = 5
Async = 6
Modification = 7
Documentation = 8
DefaultLibrary = 9


class TextDocumentSyncKind:
NONE = 0
FULL = 1