mirror of
https://github.com/dcarrillo/dotfiles.git
synced 2024-12-22 11:38:00 +00:00
[neovim] Update golang settings
This commit is contained in:
parent
6dee13061c
commit
d05e572840
@ -55,6 +55,20 @@ M.on_attach = function(client)
|
|||||||
client.server_capabilities.hover = false
|
client.server_capabilities.hover = false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if client.name == "gopls" then
|
||||||
|
if not client.server_capabilities.semanticTokensProvider then
|
||||||
|
local semantic = client.config.capabilities.textDocument.semanticTokens
|
||||||
|
client.server_capabilities.semanticTokensProvider = {
|
||||||
|
full = true,
|
||||||
|
legend = {
|
||||||
|
tokenTypes = semantic.tokenTypes,
|
||||||
|
tokenModifiers = semantic.tokenModifiers,
|
||||||
|
},
|
||||||
|
range = true,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
require("illuminate").on_attach(client)
|
require("illuminate").on_attach(client)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -3,10 +3,11 @@ return {
|
|||||||
gopls = {
|
gopls = {
|
||||||
experimentalPostfixCompletions = true,
|
experimentalPostfixCompletions = true,
|
||||||
analyses = {
|
analyses = {
|
||||||
unusedparams = true,
|
|
||||||
shadow = true,
|
shadow = true,
|
||||||
},
|
},
|
||||||
staticcheck = true,
|
staticcheck = true,
|
||||||
|
directoryFilters = { "-.git" },
|
||||||
|
semanticTokens = true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -30,3 +30,5 @@ warningCode = 0
|
|||||||
[rule.unused-parameter]
|
[rule.unused-parameter]
|
||||||
[rule.unreachable-code]
|
[rule.unreachable-code]
|
||||||
[rule.redefines-builtin-id]
|
[rule.redefines-builtin-id]
|
||||||
|
[rule.import-shadowing]
|
||||||
|
[rule.use-any]
|
||||||
|
Loading…
Reference in New Issue
Block a user