Revert "chore(nvim): deplay lsp diagnostic in insert mode"

This reverts commit c51cb965a3.
main
sudo pacman -Syu 2023-07-01 22:38:50 +07:00
parent c51cb965a3
commit 2de6a7a476
1 changed files with 1 additions and 15 deletions

View File

@ -310,20 +310,13 @@ require("lazy").setup({
-- Go -- Go
-- https://github.com/golang/tools/blob/master/gopls/doc/vim.md -- 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 -- https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#gopls
lspconfig.gopls.setup({ lspconfig.gopls.setup({
settings = { settings = {
-- https://github.com/golang/tools/blob/master/gopls/doc/settings.md
gopls = { gopls = {
gofumpt = true, gofumpt = true,
semanticTokens = 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, opts)
end, 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, end,
}, },