parent
c51cb965a3
commit
2de6a7a476
|
@ -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,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue