Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turning off linter for lspconfig #985

Closed
astavonin opened this issue Jun 17, 2021 · 2 comments
Closed

Turning off linter for lspconfig #985

astavonin opened this issue Jun 17, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@astavonin
Copy link

astavonin commented Jun 17, 2021

  • nvim --version: v0.5.0-dev
  • nvim-lspconfig version(commit hash): f81570d
  • What language server (If the problem is related to a specific language server): clangd
  • Is the problem isolated to a particular language server: clangd
  • Operating system/version: Ubuntu 18.04

How to reproduce the problem from neovim startup

Install clangd and generate JSON compilation database.

Actual behaviour

nvim reports linter warnings

Expected behaviour

A way to turn linter errors/warnings off. It is important if you already have a lining plugin like dense-analysis/ale or just needs to disable linting for specific language.

Minimal init.vim or init.lua and code sample

lua << EOF
require'lspconfig'.clangd.setup{}
EOF
@astavonin astavonin added the bug Something isn't working label Jun 17, 2021
@mjlbach
Copy link
Contributor

mjlbach commented Jun 17, 2021

I assume you mean diagnostics off. You can override the diagnostic handler using the handlers key in setup.

lua << EOF
require'lspconfig'.clangd.setup{
handlers = {['textDocument/publishDiagnostics'] = function(...) end  }
}
EOF

For future reference, none of the functionality you are inquiring about is in this plugin, it's all implemented in neovim core. Typically usage questions like this belong on our discourse https://neovim.discourse.group/

@mjlbach mjlbach closed this as completed Jun 17, 2021
@neovim-discourse
Copy link

This issue has been mentioned on Neovim Discourse. There might be relevant details there:

https://neovim.discourse.group/t/turning-off-linter-for-lspconfig/624/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants