nvim: lsp: Enable text for LSP protocol completion item kind

This commit is contained in:
Sanchayan Maity 2021-12-16 18:52:53 +05:30
parent 2a8dd6343a
commit b7762f552d
1 changed files with 28 additions and 28 deletions

View File

@ -29,6 +29,34 @@ function PeekDefinition()
return vim.lsp.buf_request(0, 'textDocument/definition', params, preview_location_callback)
end
protocol.CompletionItemKind = {
' Text' ;
' Method' ;
' Function' ;
'全Constructor' ;
' Field' ;
' Variable' ;
' Class' ;
' Interface' ;
' Module' ;
' Property' ;
' Unit' ;
' Value' ;
'螺Enum' ;
' Keyword' ;
' Snippet' ;
' Color' ;
' File' ;
' Reference' ;
' Folder' ;
' Enunm' ;
' Constant' ;
' Struct' ;
' Event' ;
'璉Operator' ;
' TypeParameter';
}
local ts_utils_setup = function(client, bufnr, opts)
if client.name == 'tsserver' then
-- Disable tsserver formatting, we want formatting via prettier
@ -144,34 +172,6 @@ local on_attach = function(client, bufnr)
vim.api.nvim_command [[autocmd CursorHoldI <buffer> lua vim.lsp.buf.document_highlight()]]
vim.api.nvim_command [[autocmd CursorMoved <buffer> lua vim.lsp.buf.clear_references()]]
end
protocol.CompletionItemKind = {
''; -- text
''; -- method
''; -- function
''; -- ctor
''; -- field
''; -- variable
''; -- class
''; -- interface
''; -- module
''; -- property
''; -- unit
''; -- value
''; -- enum
''; -- keyword
''; -- snippet
''; -- color
''; -- file
''; -- reference
''; -- folder
''; -- enum member
''; -- constant
''; -- struct
''; -- event
''; -- operator
''; -- type parameter
}
end
local on_init = function(client)