diff options
author | Jaehwang Jung <tomtomjhj@gmail.com> | 2025-01-02 17:33:16 +0900 |
---|---|---|
committer | Lewis Russell <me@lewisr.dev> | 2025-01-02 10:23:06 +0000 |
commit | 9d9ee3476e6478850ce8822c85154f0c98570371 (patch) | |
tree | 05d37c5e24bfac34e69235248772730b7c643ca2 /runtime/lua/vim/lsp/_watchfiles.lua | |
parent | efe1732c6fd802ca8fdccc1f0a26be87427f1e70 (diff) | |
download | rneovim-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.lua | 1 |
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 |