|
71 | 71 | KIND_REFACTOR = (sublime.KIND_ID_COLOR_CYANISH, "r", "Refactor")
|
72 | 72 | KIND_SOURCE = (sublime.KIND_ID_COLOR_PURPLISH, "s", "Source")
|
73 | 73 |
|
74 |
| -COMPLETION_KINDS = { |
| 74 | +COMPLETION_KINDS: Dict[CompletionItemKind, SublimeKind] = { |
75 | 75 | CompletionItemKind.Text: KIND_TEXT,
|
76 | 76 | CompletionItemKind.Method: KIND_METHOD,
|
77 | 77 | CompletionItemKind.Function: KIND_FUNCTION,
|
|
97 | 97 | CompletionItemKind.Event: KIND_EVENT,
|
98 | 98 | CompletionItemKind.Operator: KIND_OPERATOR,
|
99 | 99 | CompletionItemKind.TypeParameter: KIND_TYPEPARAMETER
|
100 |
| -} # type: Dict[CompletionItemKind, SublimeKind] |
| 100 | +} |
101 | 101 |
|
102 |
| -SYMBOL_KINDS = { |
| 102 | +SYMBOL_KINDS: Dict[SymbolKind, SublimeKind] = { |
103 | 103 | SymbolKind.File: KIND_FILE,
|
104 | 104 | SymbolKind.Module: KIND_MODULE,
|
105 | 105 | SymbolKind.Namespace: KIND_NAMESPACE,
|
|
126 | 126 | SymbolKind.Event: KIND_EVENT,
|
127 | 127 | SymbolKind.Operator: KIND_OPERATOR,
|
128 | 128 | SymbolKind.TypeParameter: KIND_TYPEPARAMETER
|
129 |
| -} # type: Dict[SymbolKind, SublimeKind] |
| 129 | +} |
130 | 130 |
|
131 |
| -DIAGNOSTIC_KINDS = { |
| 131 | +DIAGNOSTIC_KINDS: Dict[DiagnosticSeverity, SublimeKind] = { |
132 | 132 | DiagnosticSeverity.Error: KIND_ERROR,
|
133 | 133 | DiagnosticSeverity.Warning: KIND_WARNING,
|
134 | 134 | DiagnosticSeverity.Information: KIND_INFORMATION,
|
135 | 135 | DiagnosticSeverity.Hint: KIND_HINT
|
136 |
| -} # type: Dict[DiagnosticSeverity, SublimeKind] |
| 136 | +} |
137 | 137 |
|
138 |
| -CODE_ACTION_KINDS = { |
| 138 | +CODE_ACTION_KINDS: Dict[CodeActionKind, SublimeKind] = { |
139 | 139 | CodeActionKind.QuickFix: KIND_QUICKFIX,
|
140 | 140 | CodeActionKind.Refactor: KIND_REFACTOR,
|
141 | 141 | CodeActionKind.Source: KIND_SOURCE
|
142 |
| -} # type: Dict[CodeActionKind, SublimeKind] |
| 142 | +} |
143 | 143 |
|
144 | 144 |
|
145 |
| -DOCUMENT_HIGHLIGHT_KIND_NAMES = { |
| 145 | +DOCUMENT_HIGHLIGHT_KIND_NAMES: Dict[DocumentHighlightKind, str] = { |
146 | 146 | DocumentHighlightKind.Text: "text",
|
147 | 147 | DocumentHighlightKind.Read: "read",
|
148 | 148 | DocumentHighlightKind.Write: "write"
|
149 |
| -} # type: Dict[DocumentHighlightKind, str] |
| 149 | +} |
150 | 150 |
|
151 | 151 |
|
152 | 152 | # Symbol scope to kind mapping, based on https://github.com/sublimetext-io/docs.sublimetext.io/issues/30
|
153 |
| -SUBLIME_KIND_SCOPES = { |
| 153 | +SUBLIME_KIND_SCOPES: Dict[SublimeKind, str] = { |
154 | 154 | sublime.KIND_KEYWORD: "keyword | storage.modifier | storage.type | keyword.declaration | variable.language | constant.language", # noqa: E501
|
155 | 155 | sublime.KIND_TYPE: "entity.name.type | entity.name.class | entity.name.enum | entity.name.trait | entity.name.struct | entity.name.impl | entity.name.interface | entity.name.union | support.type | support.class", # noqa: E501
|
156 | 156 | sublime.KIND_FUNCTION: "entity.name.function | entity.name.method | entity.name.macro | meta.method entity.name.function | support.function | meta.function-call variable.function | meta.function-call support.function | support.method | meta.method-call variable.function", # noqa: E501
|
157 | 157 | sublime.KIND_NAMESPACE: "entity.name.module | entity.name.namespace | support.module | support.namespace",
|
158 | 158 | sublime.KIND_NAVIGATION: "entity.name.definition | entity.name.label | entity.name.section",
|
159 | 159 | sublime.KIND_MARKUP: "entity.other.attribute-name | entity.name.tag | meta.toc-list.id.html",
|
160 | 160 | sublime.KIND_VARIABLE: "entity.name.constant | constant.other | support.constant | variable.other | variable.parameter | variable.other.member | variable.other.readwrite.member" # noqa: E501
|
161 |
| -} # type: Dict[SublimeKind, str] |
| 161 | +} |
162 | 162 |
|
163 |
| -DOCUMENT_HIGHLIGHT_KIND_SCOPES = { |
| 163 | +DOCUMENT_HIGHLIGHT_KIND_SCOPES: Dict[DocumentHighlightKind, str] = { |
164 | 164 | DocumentHighlightKind.Text: "region.bluish markup.highlight.text.lsp",
|
165 | 165 | DocumentHighlightKind.Read: "region.greenish markup.highlight.read.lsp",
|
166 | 166 | DocumentHighlightKind.Write: "region.yellowish markup.highlight.write.lsp"
|
167 |
| -} # type: Dict[DocumentHighlightKind, str] |
| 167 | +} |
168 | 168 |
|
169 | 169 | SEMANTIC_TOKENS_MAP = {
|
170 | 170 | "namespace": "variable.other.namespace.lsp",
|
|
0 commit comments