From b7762f552da01077725fd25c12cced80058d0d86 Mon Sep 17 00:00:00 2001 From: Sanchayan Maity Date: Thu, 16 Dec 2021 18:52:53 +0530 Subject: [PATCH] nvim: lsp: Enable text for LSP protocol completion item kind --- nvim/.config/nvim/lua/lsp.lua | 56 +++++++++++++++++------------------ 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/nvim/.config/nvim/lua/lsp.lua b/nvim/.config/nvim/lua/lsp.lua index ad4ccac..8304bad 100644 --- a/nvim/.config/nvim/lua/lsp.lua +++ b/nvim/.config/nvim/lua/lsp.lua @@ -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 lua vim.lsp.buf.document_highlight()]] vim.api.nvim_command [[autocmd CursorMoved 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)