diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2021-07-09 17:54:42 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2021-07-09 17:54:42 +0200 |
| commit | 5487e6b9a5afc852e1cb757157e386a4658a8a82 (patch) | |
| tree | 0b86e0a8b0d4bf5c20878eb3576099b93680b503 | |
| parent | bfcd8ce5955b282c635d4858aa9bb62981ed67a1 (diff) | |
| download | vis-lspc-0.1.2.tar.gz vis-lspc-0.1.2.zip | |
Automatically open current file when showing diagnosticsv0.1.2
This is more consistent with the other lspc functions.
| -rw-r--r-- | init.lua | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -937,11 +937,12 @@ local lspc_goto_location_methods = { } local function lspc_show_diagnostic(ls, win, line) - local open_file = ls.open_files[win.file.path] - if not open_file then - return win.file.path .. ' not open in ' .. ls.name + if not ls.open_files[win.file.path] then + lspc_open(ls, win, win.file) end + local open_file = ls.open_files[win.file.path] + local diagnostics = open_file.diagnostics if not diagnostics then return win.file.path .. ' has no diagnostics available' |
