Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion lsp/golangci_lint_ls.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,22 @@ return {
cmd = { 'golangci-lint-langserver' },
filetypes = { 'go', 'gomod' },
init_options = {
command = { 'golangci-lint', 'run', '--output.json.path=stdout', '--show-stats=false' },
command = {
'golangci-lint',
'run',
-- disable all output formats that might be enabled by the users .golangci.yml
'--output.text.path=',
'--output.tab.path=',
'--output.html.path=',
'--output.checkstyle.path=',
'--output.junit-xml.path=',
'--output.teamcity.path=',
'--output.sarif.path=',
-- disable stats output
'--show-stats=false',
-- enable JSON output to be used by the language server
'--output.json.path=stdout',
},
},
root_markers = {
'.golangci.yml',
Expand Down
17 changes: 16 additions & 1 deletion lua/lspconfig/configs/golangci_lint_ls.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,22 @@ return {
cmd = { 'golangci-lint-langserver' },
filetypes = { 'go', 'gomod' },
init_options = {
command = { 'golangci-lint', 'run', '--output.json.path=stdout', '--show-stats=false' },
command = {
'golangci-lint',
'run',
-- disable all output formats that might be enabled by the users .golangci.yml
'--output.text.path=',
'--output.tab.path=',
'--output.html.path=',
'--output.checkstyle.path=',
'--output.junit-xml.path=',
'--output.teamcity.path=',
'--output.sarif.path=',
-- disable stats output
'--show-stats=false',
-- enable JSON output to be used by the language server
'--output.json.path=stdout',
},
},
root_dir = function(fname)
return util.root_pattern(
Expand Down
Loading