You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.2 KiB
Lua
51 lines
1.2 KiB
Lua
local on_attach = function(client, bufnr)
|
|
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('lspconfig').gopls.setup {
|
|
on_attach = on_attach,
|
|
}
|
|
|
|
return {
|
|
{
|
|
'fredrikaverpil/neotest-golang',
|
|
},
|
|
{
|
|
'echasnovski/mini.icons',
|
|
opts = {
|
|
file = {
|
|
['.go-version'] = { glyph = '', hl = 'MiniIconsBlue' },
|
|
},
|
|
filetype = {
|
|
gotmpl = { glyph = '', hl = 'MiniIconsGrey' },
|
|
},
|
|
},
|
|
},
|
|
{
|
|
'nvim-neotest/neotest',
|
|
optional = true,
|
|
dependencies = {
|
|
'fredrikaverpil/neotest-golang',
|
|
},
|
|
opts = {
|
|
adapters = {
|
|
['neotest-golang'] = {
|
|
-- Here we can set options for neotest-golang, e.g.
|
|
-- go_test_args = { "-v", "-race", "-count=1", "-timeout=60s" },
|
|
dap_go_enabled = true, -- requires leoluz/nvim-dap-go
|
|
},
|
|
},
|
|
},
|
|
},
|
|
}
|