Switch variables to dictionary key
This commit is contained in:
parent
6637de46c2
commit
e6ee613e00
1 changed files with 25 additions and 51 deletions
|
@ -22,58 +22,32 @@ let s:timer_id = -1
|
||||||
let s:last_done_pos = []
|
let s:last_done_pos = []
|
||||||
|
|
||||||
" CompletionItemKind values from the LSP protocol.
|
" CompletionItemKind values from the LSP protocol.
|
||||||
let s:LSP_COMPLETION_TEXT_KIND = 1
|
|
||||||
let s:LSP_COMPLETION_METHOD_KIND = 2
|
|
||||||
let s:LSP_COMPLETION_FUNCTION_KIND = 3
|
|
||||||
let s:LSP_COMPLETION_CONSTRUCTOR_KIND = 4
|
|
||||||
let s:LSP_COMPLETION_FIELD_KIND = 5
|
|
||||||
let s:LSP_COMPLETION_VARIABLE_KIND = 6
|
|
||||||
let s:LSP_COMPLETION_CLASS_KIND = 7
|
|
||||||
let s:LSP_COMPLETION_INTERFACE_KIND = 8
|
|
||||||
let s:LSP_COMPLETION_MODULE_KIND = 9
|
|
||||||
let s:LSP_COMPLETION_PROPERTY_KIND = 10
|
|
||||||
let s:LSP_COMPLETION_UNIT_KIND = 11
|
|
||||||
let s:LSP_COMPLETION_VALUE_KIND = 12
|
|
||||||
let s:LSP_COMPLETION_ENUM_KIND = 13
|
|
||||||
let s:LSP_COMPLETION_KEYWORD_KIND = 14
|
|
||||||
let s:LSP_COMPLETION_SNIPPET_KIND = 15
|
|
||||||
let s:LSP_COMPLETION_COLOR_KIND = 16
|
|
||||||
let s:LSP_COMPLETION_FILE_KIND = 17
|
|
||||||
let s:LSP_COMPLETION_REFERENCE_KIND = 18
|
|
||||||
let s:LSP_COMPLETION_FOLDER_KIND = 19
|
|
||||||
let s:LSP_COMPLETION_ENUM_MEMBER_KIND = 20
|
|
||||||
let s:LSP_COMPLETION_CONSTANT_KIND = 21
|
|
||||||
let s:LSP_COMPLETION_STRUCT_KIND = 22
|
|
||||||
let s:LSP_COMPLETION_EVENT_KIND = 23
|
|
||||||
let s:LSP_COMPLETION_OPERATOR_KIND = 24
|
|
||||||
let s:LSP_COMPLETION_TYPE_PARAMETER_KIND = 25
|
|
||||||
|
|
||||||
let g:ale_lsp_types = {
|
let g:ale_lsp_types = {
|
||||||
\ s:LSP_COMPLETION_TEXT_KIND: 'text',
|
\ 1: 'text',
|
||||||
\ s:LSP_COMPLETION_METHOD_KIND: 'method',
|
\ 2: 'method',
|
||||||
\ s:LSP_COMPLETION_FUNCTION_KIND: 'function',
|
\ 3: 'function',
|
||||||
\ s:LSP_COMPLETION_CONSTRUCTOR_KIND: 'constructor',
|
\ 4: 'constructor',
|
||||||
\ s:LSP_COMPLETION_FIELD_KIND: 'field',
|
\ 5: 'field',
|
||||||
\ s:LSP_COMPLETION_VARIABLE_KIND: 'variable',
|
\ 6: 'variable',
|
||||||
\ s:LSP_COMPLETION_CLASS_KIND: 'class',
|
\ 7: 'class',
|
||||||
\ s:LSP_COMPLETION_INTERFACE_KIND: 'interface',
|
\ 8: 'interface',
|
||||||
\ s:LSP_COMPLETION_MODULE_KIND: 'module',
|
\ 9: 'module',
|
||||||
\ s:LSP_COMPLETION_PROPERTY_KIND: 'property',
|
\ 10: 'property',
|
||||||
\ s:LSP_COMPLETION_UNIT_KIND: 'unit',
|
\ 11: 'unit',
|
||||||
\ s:LSP_COMPLETION_VALUE_KIND: 'value',
|
\ 12: 'value',
|
||||||
\ s:LSP_COMPLETION_ENUM_KIND: 'enum',
|
\ 13: 'enum',
|
||||||
\ s:LSP_COMPLETION_KEYWORD_KIND: 'keyword',
|
\ 14: 'keyword',
|
||||||
\ s:LSP_COMPLETION_SNIPPET_KIND: 'snippet',
|
\ 15: 'snippet',
|
||||||
\ s:LSP_COMPLETION_COLOR_KIND: 'color',
|
\ 16: 'color',
|
||||||
\ s:LSP_COMPLETION_FILE_KIND: 'file',
|
\ 17: 'file',
|
||||||
\ s:LSP_COMPLETION_REFERENCE_KIND: 'reference',
|
\ 18: 'reference',
|
||||||
\ s:LSP_COMPLETION_FOLDER_KIND: 'folder',
|
\ 19: 'folder',
|
||||||
\ s:LSP_COMPLETION_ENUM_MEMBER_KIND: 'enum_member',
|
\ 20: 'enum_member',
|
||||||
\ s:LSP_COMPLETION_CONSTANT_KIND: 'constant',
|
\ 21: 'constant',
|
||||||
\ s:LSP_COMPLETION_STRUCT_KIND: 'struct',
|
\ 22: 'struct',
|
||||||
\ s:LSP_COMPLETION_EVENT_KIND: 'event',
|
\ 23: 'event',
|
||||||
\ s:LSP_COMPLETION_OPERATOR_KIND: 'operator',
|
\ 24: 'operator',
|
||||||
\ s:LSP_COMPLETION_TYPE_PARAMETER_KIND: 'type_parameter',
|
\ 25: 'type_parameter',
|
||||||
\ }
|
\ }
|
||||||
|
|
||||||
" from https://github.com/microsoft/TypeScript/blob/29becf05012bfa7ba20d50b0d16813971e46b8a6/lib/protocol.d.ts#L2472
|
" from https://github.com/microsoft/TypeScript/blob/29becf05012bfa7ba20d50b0d16813971e46b8a6/lib/protocol.d.ts#L2472
|
||||||
|
|
Reference in a new issue