How to integrate golangci linter #19832
-
Hi, I’m feeling a bit lost here. Can anyone help me with integrating golangci-linter? I installed the golangci-linter extension in Zed, but nothing seems to happen, and I couldn’t find any documentation. I’m really excited to use Zed, but finding “how-to” guides has been challenging. Thanks for any help you can provide! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
It needs golangci-lint and golangci-lint-langserver to be installed and available to the extension as binaries, as well as some additional config in "lsp": {
"golangci-lint": {
"initialization_options": {
"command": [
"golangci-lint",
"run",
"--enable-all",
"--disable",
"lll",
"--out-format",
"json",
"--issues-exit-code=1"
]
}
}
},
"languages": {
"Go": {
"language_servers": ["gopls", "golangci-lint"]
}
} If this doesn't do anything, you will probably have to update the ...
[language_servers.golangci-lint]
language = "Golangci Lint"
languages = ["Go"] // change this line
... All of the above is a summary of this issue and open PR's on extension repo. |
Beta Was this translation helpful? Give feedback.
I wasn't able to get the squiggly line underline for the entire line neither, and the logs confirm that it's not marking it