aboutsummaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/init.lua b/init.lua
index ddad310..7073136 100644
--- a/init.lua
+++ b/init.lua
@@ -1204,7 +1204,10 @@ local function lspc_close(ls, file)
ls_send_notification(ls, 'textDocument/didClose', {
textDocument = {uri = path_to_uri(file.path)},
})
- lspc.open_files[file.path][ls] = nil
+ lspc.open_files[file.path].language_servers[ls] = nil
+ if not next(lspc.open_files[file.path].language_servers) then
+ lspc.open_files[file.path] = nil
+ end
end
-- register a file as open with a language server and setup close and save event handlers