diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2023-10-08 10:02:23 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2023-10-12 18:50:09 +0200 |
| commit | 067ec7dd2d5006af72aa73a4fada5380da5c0126 (patch) | |
| tree | 9bea307e9cdfb8828262ff0aa8f28d96acd73730 /init.lua | |
| parent | 020f6b2d674b1b4e70b847bd6b4eb2e67f6eb923 (diff) | |
| download | vis-lspc-067ec7dd2d5006af72aa73a4fada5380da5c0126.tar.gz vis-lspc-067ec7dd2d5006af72aa73a4fada5380da5c0126.zip | |
store diagnostics received for files not in the current window
Diffstat (limited to 'init.lua')
| -rw-r--r-- | init.lua | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -975,7 +975,7 @@ end local function lspc_handle_publish_diagnostics(ls, uri, diagnostics) local file_path = uri_to_path(uri) local file = ls.open_files[file_path] - if file and file_path == vis.win.file.path then + if file then for _, diagnostic in ipairs(diagnostics) do -- We convert the lsp_range to a vis_range here to do it only once. -- And because we can't do it during a WIN_HIGHLIGHT events because @@ -991,7 +991,9 @@ local function lspc_handle_publish_diagnostics(ls, uri, diagnostics) end file.diagnostics = diagnostics - lspc.log('remember diagnostics for ' .. file_path) + lspc.log('remembered ' .. #diagnostics .. ' diagnostics for ' .. file_path) + else + lspc.log('Diagnostics for not opened file' .. file_path) end end |
