Skip to content

Commit

Permalink
neovim: update gopls configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
geodimm committed Oct 19, 2024
1 parent 062ef48 commit c6c8042
Showing 1 changed file with 16 additions and 17 deletions.
33 changes: 16 additions & 17 deletions nvim/lua/plugins/lsp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -48,34 +48,31 @@ local servers_config = {
return {
settings = {
gopls = {
-- build
buildFlags = buildFlags,
-- formatting
gofumpt = true,
-- ui
codelenses = {
tidy = true,
vendor = true,
generate = true,
regenerate_cgo = true,
upgrade_dependency = true,
gc_details = true,
test = true,
run_vulncheck_exp = true,
run_govulncheck = true,
},
semanticTokens = true,
-- completion
usePlaceholders = true,
-- diagnostic
analyses = {
useany = true,
nilness = true,
unusedparams = true,
unusedvariable = true,
unusedwrite = true,
shadow = true,
},
semanticTokens = true,
gofumpt = true,
staticcheck = true,
importShortcut = 'Both',
completionDocumentation = true,
linksInHover = true,
usePlaceholders = true,
experimentalPostfixCompletions = true,
vulncheck = 'Imports',
-- documentation
hoverKind = 'FullDocumentation',
linksInHover = true,
-- inlay hints
hints = {
assignVariableTypes = true,
compositeLiteralFields = true,
Expand All @@ -85,6 +82,8 @@ local servers_config = {
parameterNames = true,
rangeVariableTypes = true,
},
-- navigation
importShortcut = 'Both',
},
tags = { skipUnexported = true },
},
Expand Down Expand Up @@ -205,7 +204,7 @@ return {
return
end
return {
timeout_ms = 1000,
timeout_ms = 5000,
lsp_fallback = true,
}
end,
Expand Down

0 comments on commit c6c8042

Please sign in to comment.