This commit is contained in:
2025-06-18 14:38:36 +01:00
commit 71b7bd7373
32 changed files with 1494 additions and 0 deletions

View File

@ -0,0 +1,31 @@
local M = {
filetypes = { 'go', 'gomod' },
}
-- disable lsp if wrong version installed
function M.enable()
local enable = true
if
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)
then
return enable
else
return false -- disable if golangci-lint isn't available
end
end
return M