hrsh7th / cmp-nvim-lsp

nvim-cmp source for neovim builtin LSP client
MIT License
1.29k stars 52 forks source link

Hide warning and error show on editor #49

Closed TroySigX closed 1 year ago

TroySigX commented 1 year ago

The diagnostic shows like this: image How do I hide the 'E' and 'W' on the left side, and the diagnostic on the right side?

gegoune commented 1 year ago

That has nothing to do with this source and cmp plugin in general. You need to set that in configuration for lsp client (I assume it's built in lsp client). You most likely have signs defined for those diagnostics, have a look at help for lsp in nvim.

rorystephenson commented 1 year ago

This worked for me:

-- Make diagnostics less intrusive
vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(
  vim.lsp.diagnostic.on_publish_diagnostics, {
    virtual_text = false,
    signs = false,
    underline = true,
    severity_sort = true,
  }
)
TroySigX commented 1 year ago

Thank you @rorystephenson!