From 2de6a7a47618d9bfff18e4a34bfcf586776f1894 Mon Sep 17 00:00:00 2001 From: Hau Nguyen Date: Sat, 1 Jul 2023 22:38:50 +0700 Subject: [PATCH] Revert "chore(nvim): deplay lsp diagnostic in insert mode" This reverts commit c51cb965a3651ab2e0e9bfcf5b06a712a0d6efc5. --- data/nvim/init.lua | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/data/nvim/init.lua b/data/nvim/init.lua index a72d9b7..3047659 100644 --- a/data/nvim/init.lua +++ b/data/nvim/init.lua @@ -310,20 +310,13 @@ require("lazy").setup({ -- Go -- https://github.com/golang/tools/blob/master/gopls/doc/vim.md + -- https://github.com/golang/tools/blob/master/gopls/doc/settings.md -- https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#gopls lspconfig.gopls.setup({ settings = { - -- https://github.com/golang/tools/blob/master/gopls/doc/settings.md gopls = { gofumpt = true, semanticTokens = true, - -- https://github.com/golang/tools/blob/master/gopls/doc/analyzers.md - analyses = { - fieldalignment = true, - nilness = true, - shadow = true, - useany = true, - }, }, }, }) @@ -379,13 +372,6 @@ require("lazy").setup({ end, opts) end, }) - - -- https://github.com/neovim/nvim-lspconfig/issues/127 - vim.lsp.handlers["textDocument/publishDiagnostics"] = - vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, { - -- delay update diagnostics - update_in_insert = false, - }) end, },