diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2023-10-08 10:18:27 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2023-10-12 18:50:20 +0200 |
| commit | 1d9b9603bb98a0cd0fc8240cbe0a7989bf785db0 (patch) | |
| tree | 3636915b196aac0f0977e5ca1b5b04dc76dc24e0 /init.lua | |
| parent | 067ec7dd2d5006af72aa73a4fada5380da5c0126 (diff) | |
| download | vis-lspc-1d9b9603bb98a0cd0fc8240cbe0a7989bf785db0.tar.gz vis-lspc-1d9b9603bb98a0cd0fc8240cbe0a7989bf785db0.zip | |
report if no diagnostics are available
Since the diagnostics table is created when we open the file
it will always be ~= nil.
Diffstat (limited to 'init.lua')
| -rw-r--r-- | init.lua | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1319,7 +1319,7 @@ local function lspc_show_diagnostic(ls, win, line) local open_file = ls.open_files[win.file.path] local diagnostics = open_file.diagnostics - if not diagnostics then + if not diagnostics or #diagnostics == 0 then return win.file.path .. ' has no diagnostics available' end |
