enable linter using nvim-lint #2956
Replies: 3 comments 1 reply
-
|
This sounds like a question to ask in the nvim-lint repository since it doesn't really have to do with Since I assume this tool just invokes the |
Beta Was this translation helpful? Give feedback.
-
|
OK so this is what I have at the moment, which doesn't work very well. 😞 Here is my Here is an example code file that has some issues: From what I can tell the fundamental problems are gofumpt and goimports aren't running when expected. The io/os packages did eventually get dynamically added as imports when I typed os.ErrClosed and io.ErrClosedPipe. But for some reason the fmt package would not get added at all no matter how many times I typed a line consisting of that package. This suggests the goimports tool isn't always being run when it should (e.g. when the file is being written to/updated). I also noticed that when imports are dynamically added, then the order of the imports were also being sorted correctly (again, that's a side effect of goimports actually being run but just something I wanted to note). So why does typing any kind of fmt line, like Here is my neovim configuration:
Here is the output of manually running the Other neovim configuration I have is (this was placed after the above neovim configuration in my |
Beta Was this translation helpful? Give feedback.
-
|
I've also just tried with a fresh project: The Again this suggests the But then I went to check for a code action on the
Once I selected one of the options, and the package was imported for me, the error disappeared obviously, but then I saw the following error: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to use https://github.com/mfussenegger/nvim-lint to run golangci-lint but the
gofumptcommand isn't enabled by default.The nvim-lint repo has a way to customise a linting tool like golangci-lint but I'm not sure how to configure the specific
--enableflag which is under theconfig pathcommand (which I think is what I need to do)?Beta Was this translation helpful? Give feedback.
All reactions