Files
vimrc/lua/plugins/lsp/golangci_lint_ls.lua
2025-06-20 11:49:38 +01:00

22 lines
498 B
Lua

return {
enable = function() -- disable lsp if wrong version installed
local enable = true
local ok, _ = pcall(function()
vim
.system({ 'golangci-lint', '--version' }, { text = true }, function(out)
if out.code ~= 0 then
enable = false
return
end
if out.stdout:match ' 1%.%d+%.%d+' then
enable = false
return
end
end)
:wait()
end)
return enable and ok
end,
}