mirror of
https://github.com/dcarrillo/dotfiles.git
synced 2024-12-22 06:58:01 +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
|
||||
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)
|
||||
end
|
||||
|
||||
|
@ -3,10 +3,11 @@ return {
|
||||
gopls = {
|
||||
experimentalPostfixCompletions = true,
|
||||
analyses = {
|
||||
unusedparams = true,
|
||||
shadow = true,
|
||||
},
|
||||
staticcheck = true,
|
||||
directoryFilters = { "-.git" },
|
||||
semanticTokens = true,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -30,3 +30,5 @@ warningCode = 0
|
||||
[rule.unused-parameter]
|
||||
[rule.unreachable-code]
|
||||
[rule.redefines-builtin-id]
|
||||
[rule.import-shadowing]
|
||||
[rule.use-any]
|
||||
|
Loading…
Reference in New Issue
Block a user