aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp/_watchfiles.lua
diff options
context:
space:
mode:
authorJaehwang Jung <tomtomjhj@gmail.com>2025-01-02 17:33:16 +0900
committerLewis Russell <me@lewisr.dev>2025-01-02 10:23:06 +0000
commit9d9ee3476e6478850ce8822c85154f0c98570371 (patch)
tree05d37c5e24bfac34e69235248772730b7c643ca2 /runtime/lua/vim/lsp/_watchfiles.lua
parentefe1732c6fd802ca8fdccc1f0a26be87427f1e70 (diff)
downloadrneovim-9d9ee3476e6478850ce8822c85154f0c98570371.tar.gz
rneovim-9d9ee3476e6478850ce8822c85154f0c98570371.tar.bz2
rneovim-9d9ee3476e6478850ce8822c85154f0c98570371.zip
fix(lsp): ensure watcher cancel
* Cancel watcher in the "force" case. * Cancel watcher outside the async callback. It seems nvim doesn't wait async jobs on quitting, leaving detached inotifywait processes. * Clean up cancelling callbacks.
Diffstat (limited to 'runtime/lua/vim/lsp/_watchfiles.lua')
-rw-r--r--runtime/lua/vim/lsp/_watchfiles.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/runtime/lua/vim/lsp/_watchfiles.lua b/runtime/lua/vim/lsp/_watchfiles.lua
index 248969885c..4711b3cc9b 100644
--- a/runtime/lua/vim/lsp/_watchfiles.lua
+++ b/runtime/lua/vim/lsp/_watchfiles.lua
@@ -174,6 +174,7 @@ function M.cancel(client_id)
cancel()
end
end
+ cancels[client_id] = nil
end
return M