Skip to content

Commit

Permalink
neovim: update gopls config
Browse files Browse the repository at this point in the history
  • Loading branch information
pythops committed Jul 30, 2024
1 parent 8aabee7 commit 21fd172
Showing 1 changed file with 24 additions and 6 deletions.
30 changes: 24 additions & 6 deletions roles/configure/files/config/nvim/lua/plugins/lsp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,30 @@ return {
lspconfig.gopls.setup({
on_attach = on_attach,
capabilities = capabilities,
settings = {
gopls = {
gofumpt = true,
hints = {
assignVariableTypes = true,
compositeLiteralFields = true,
compositeLiteralTypes = true,
constantValues = true,
functionTypeParameters = true,
parameterNames = true,
rangeVariableTypes = true,
},
analyses = {
fieldalignment = true,
nilness = true,
unusedparams = true,
unusedwrite = true,
useany = true,
},
usePlaceholders = true,
staticcheck = true,
semanticTokens = true,
},
},
})

-- Bash --
Expand All @@ -279,12 +303,6 @@ return {
capabilities = capabilities,
})

-- Go --
require("lspconfig").gopls.setup({
on_attach = on_attach,
capabilities = capabilities,
})

-- Toml --
require("lspconfig").taplo.setup({
on_attach = on_attach,
Expand Down

0 comments on commit 21fd172

Please sign in to comment.