issue #266 Error when opening Go files

pull/268/head
ray-x 1 year ago
parent d88d393d09
commit ab42ffc5c6

@ -92,12 +92,17 @@ M.defaults = function()
and not client.server_capabilities.semanticTokensProvider
then
local semantic = client.config.capabilities.textDocument.semanticTokens
if semantic then
client.server_capabilities.semanticTokensProvider = {
full = true,
legend = { tokenModifiers = semantic.tokenModifiers, tokenTypes = semantic.tokenTypes },
legend = {
tokenModifiers = semantic.tokenModifiers,
tokenTypes = semantic.tokenTypes,
},
range = true,
}
end
end
end,
root_dir = function(fname)
return util.root_pattern('go.mod', '.git')(fname) or util.path.dirname(fname)

Loading…
Cancel
Save