aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/_meta/options.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2024-09-30 15:25:44 +0200
committerJustin M. Keyes <justinkz@gmail.com>2024-10-02 16:41:01 +0200
commit9e23b4e1852f9ad6418b45f827d1fb160611d8cf (patch)
tree6b4a20275919f355d3c3bdc3e0d4867da176938e /runtime/lua/vim/_meta/options.lua
parent391c5084d1181a6742ebd8551efda4db7e8ca46e (diff)
downloadrneovim-9e23b4e1852f9ad6418b45f827d1fb160611d8cf.tar.gz
rneovim-9e23b4e1852f9ad6418b45f827d1fb160611d8cf.tar.bz2
rneovim-9e23b4e1852f9ad6418b45f827d1fb160611d8cf.zip
fix(watch): ignore nonexistent paths (ENOENT)
Problem: The `_watch.watch()` strategy may fail if the given path does not exist: …/vim/_watch.lua:101: ENOENT: no such file or directory stack traceback: [C]: in function 'assert' …/vim/_watch.lua:101: in function <…/vim/_watch.lua:61> [string "<nvim>"]:5: in main chunk - `_watch.watch()` actively asserts any error returned by `handle:start()`. - whereas `_watch.watchdirs()` just ignores the result of `root_handle:start()`. Servers may send "client/registerCapability" with "workspace/didChangeWatchedFiles" item(s) (`baseUri`) which do not actually exist on the filesystem: https://github.com/neovim/neovim/issues/28058#issuecomment-2189929424 { method = "client/registerCapability", params = { registrations = { { method = "workspace/didChangeWatchedFiles", registerOptions = { watchers = { { globPattern = { baseUri = "file:///Users/does/not/exist", pattern = "**/*.{ts,js,mts,mjs,cjs,cts,json,svelte}" } }, ... } Solution: - Remove the assert in `_watch.watch()`. - Show a once-only message for both cases. - More detailed logging is blocked until we have `nvim_log` / `vim.log`. fix #28058
Diffstat (limited to 'runtime/lua/vim/_meta/options.lua')
0 files changed, 0 insertions, 0 deletions