From 3fb9969ebadd8e80c30cf8b1507958e31f9a4a86 Mon Sep 17 00:00:00 2001 From: jdhao Date: Thu, 8 Apr 2021 00:18:20 +0800 Subject: [PATCH] update nvim-lsp config --- core/plugins.vim | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/core/plugins.vim b/core/plugins.vim index 8d953fc..b74622e 100644 --- a/core/plugins.vim +++ b/core/plugins.vim @@ -397,6 +397,23 @@ vim.fn.sign_define('LspDiagnosticsSignError', { text = "✗", texthl = "LspDiagn vim.fn.sign_define('LspDiagnosticsSignWarning', { text = "!", texthl = "LspDiagnosticsDefaultWarning" }) vim.fn.sign_define('LspDiagnosticsSignInformation', { text = "", texthl = "LspDiagnosticsDefaultInformation" }) vim.fn.sign_define('LspDiagnosticsSignHint', { text = "", texthl = "LspDiagnosticsDefaultHint" }) + +vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with( + vim.lsp.diagnostic.on_publish_diagnostics, { + underline = false, + virtual_text = false, + signs = true, + update_in_insert = false, + } +) + +-- The following settings works with the bleeding edge neovim. +-- See https://github.com/neovim/neovim/pull/13998. +-- vim.lsp.handlers["textDocument/hover"] = vim.lsp.with( +-- vim.lsp.handlers.hover, { +-- border = 'single' +-- } +-- ) EOF " nvim-compe settings @@ -426,15 +443,6 @@ require'compe'.setup { }; } -vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with( - vim.lsp.diagnostic.on_publish_diagnostics, { - underline = false, - virtual_text = false, - signs = true, - update_in_insert = false, - } -) - vim.o.completeopt = "menuone,noselect" EOF