Skip to content

Commit

Permalink
feat(go): add go.nvim recommended gopls settings
Browse files Browse the repository at this point in the history
  • Loading branch information
mehalter committed Feb 22, 2024
1 parent 515050b commit fbbe615
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions lua/astrocommunity/pack/go/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,45 @@ return {
gopls = {
settings = {
gopls = {
analyses = {
ST1003 = true,
fieldalignment = false,
fillreturns = true,
nilness = true,
nonewvars = true,
shadow = true,
undeclaredname = true,
unreachable = true,
unusedparams = true,
unusedwrite = true,
useany = true,
},
codelenses = {
gc_details = true, -- Show a code lens toggling the display of gc's choices.
generate = true, -- show the `go generate` lens.
regenerate_cgo = true,
test = true,
tidy = true,
upgrade_dependency = true,
vendor = true,
},
hints = {
assignVariableTypes = true,
compositeLiteralFields = true,
compositeLiteralTypes = true,
constantValues = true,
functionTypeParameters = true,
parameterNames = true,
rangeVariableTypes = true,
},
buildFlags = { "-tags", "integration" },
completeUnimported = true,
diagnosticsDelay = "500ms",
matcher = "Fuzzy",
semanticTokens = true,
staticcheck = true,
symbolMatcher = "fuzzy",
usePlaceholders = true,
},
},
},
Expand Down

0 comments on commit fbbe615

Please sign in to comment.