nvim-lint
nvim-lint copied to clipboard
Source as a top-level option
Would it be possible to have the source as a top-level option to the linter rather than to be part of the parser function?
In this way it would be easier to reuse an existing linter configuration, for example as:
lint = require('lint')
lint.linters.mylinter = copy_tbl(lint.linters.mypy)
lint.linters.mylinter.source = 'mylinter'
Can you elaborate why you would like to customize the source names?
At work we use a custom command to run effectively typing check using mypy. So the error formats etc are the same. I could of course setup a custom linter by copying whats in lint.linters.mypy but it would be cleaner if I can just reuse that code as above (and update cmd and args). I do want to give it a different name though to distinguish it from the standard mypy.
Can you elaborate why you would like to customize the source names?
I'd like to be able to easily fetch all the diagnostic sources attached by nvim-lit and call vim.diagnostic.reset() if some condition is fulfilled. Adding a prefix to the name in my case would help me separate sources from e.g lsp.
This seems rather an edge case, I may change my mind around this but currently I have no plans to support this.
(Note that wrapping the parse function and post-process the result is currently an option)