mfussenegger / nvim-lint

An asynchronous linter plugin for Neovim complementary to the built-in Language Server Protocol support.
GNU General Public License v3.0
1.77k stars 191 forks source link

[help wanted] How to Enable a Linter (cspell) for All Languages? #563

Closed Saplyn closed 3 months ago

Saplyn commented 3 months ago

Problem

Specifically, I wanted to enable cspell for all languages (md, cpp, rs, etc.) for spell checking, but didn't find a convenient way to do so.

I've Tried

lint.linters_by_ft = {
  markdown = { 'markdownlint' },
  text = { 'cspell' },
}

Expectation

I want to know if there's a convenient way to do so, like...

lint.linters_by_ft = {
  all = { 'cspell' },
}

... or some thing like that.

Misc

I noticed that enabling cspell for one language (I've tried markdown) is possible through the linters_by_ft:

lint.linters_by_ft = {
  markdown = { 'markdownlint', 'cspell' },
}

For reference, my neovim config.

mfussenegger commented 3 months ago

https://github.com/mfussenegger/nvim-lint/issues/355#issuecomment-1759203127

Saplyn commented 3 months ago

Thanks and sorry for not checking the right place. And... shall we add the solution to the README or some sort of FAQ? It seems to be a common problem.