re-organised config
This commit is contained in:
19
lua/plugins/lsp/golangci_lint_ls.lua
Normal file
19
lua/plugins/lsp/golangci_lint_ls.lua
Normal file
@ -0,0 +1,19 @@
|
||||
return {
|
||||
enable = function() -- disable lsp if wrong version installed
|
||||
local enable = true
|
||||
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()
|
||||
|
||||
return enable
|
||||
end,
|
||||
}
|
||||
Reference in New Issue
Block a user