onsails/vimway-lsp-diag.nvim

github github
neovim-0.5 plugin
star 45
stars
alert-circle 4
open issues
users 2
subscribers
git-branch 3
forks
CREATED

2021-07-21

UPDATED

10 days ago

packer

require('packer').startup(function()
  use 'onsails/vimway-lsp-diag.nvim'
end)

paq

require "paq" { 
  'onsails/vimway-lsp-diag.nvim'
}

Live-updating Neovim LSP diagnostics in quickfix and loclist

demo

Features

  • workspace diagnostics of all buffers in quickfix
    • prioritize current buf diagnostics
    • live diagnostics update
    • no conflicts with other commands using quickfix
    • debounce
    • optionally show only current buffer's clients diagnostics
  • current buffer diagnostics in loclist
    • live diagnostics update
    • no conflicts with other commands using loclist
    • debounce

Setup

lua require("diaglist").init({
    -- optional settings
    -- below are defaults

    -- increase for noisy servers
    debounce_ms = 50,

    -- list in quickfix only diagnostics from clients
    -- attached to a current buffer
    -- if false, all buffers' clients diagnostics is collected
    buf_clients_only = true, 
})

Init sets diag update on LspDiagnosticsChanged, WinEnter, BufEnter for live diagnostics update and QuickFixCmdPre to avoid conflicts with other commands using quickfix.

Mappings

There are no default mappings. Here is an example:

nmap <space>dw <cmd>lua require('diaglist').open_all_diagnostics()<cr>
nmap <space>d0 <cmd>lua require('diaglist').open_buffer_diagnostics()<cr>