From 8149bd089e15043576b1e6588babd9c121740f1a Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Sun, 3 Mar 2024 11:54:39 +0000 Subject: feat(lsp): report fswatch errors Resolves #27713 Co-authored-by: Tomasz N --- runtime/lua/vim/_watch.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'runtime/lua/vim/_watch.lua') 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) -- cgit