aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLewis Russell <lewis6991@gmail.com>2024-03-03 11:54:39 +0000
committerLewis Russell <me@lewisr.dev>2024-03-06 10:57:21 +0000
commit8149bd089e15043576b1e6588babd9c121740f1a (patch)
tree677830f01b6fddd56fcb14a0aee71cfb29ca21da
parent3d2aeec68d6a03a07394eea154447166f6487078 (diff)
downloadrneovim-8149bd089e15043576b1e6588babd9c121740f1a.tar.gz
rneovim-8149bd089e15043576b1e6588babd9c121740f1a.tar.bz2
rneovim-8149bd089e15043576b1e6588babd9c121740f1a.zip
feat(lsp): report fswatch errors
Resolves #27713 Co-authored-by: Tomasz N <przepompownia@users.noreply.github.com>
-rw-r--r--runtime/lua/vim/_watch.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/runtime/lua/vim/_watch.lua b/runtime/lua/vim/_watch.lua
index d199cf8e29..97c5481ad1 100644
--- a/runtime/lua/vim/_watch.lua
+++ b/runtime/lua/vim/_watch.lua
@@ -283,6 +283,17 @@ function M.fswatch(path, opts, callback)
'/.git/',
path,
}, {
+ stderr = function(err, data)
+ if err then
+ error(err)
+ end
+
+ if data and #vim.trim(data) > 0 then
+ vim.schedule(function()
+ vim.notify('fswatch: ' .. data, vim.log.levels.ERROR)
+ end)
+ end
+ end,
stdout = function(err, data)
if err then
error(err)