aboutsummaryrefslogtreecommitdiff
path: root/test/functional/plugin
diff options
context:
space:
mode:
authorLewis Russell <lewis6991@gmail.com>2024-02-07 11:28:35 +0000
committerLewis Russell <lewis6991@gmail.com>2024-03-01 23:00:20 +0000
commit4ff3217bbd8747d2d44680a825ac29097faf9c4b (patch)
tree22b024bfa5738a0556a88f9a35fca8cbe619841a /test/functional/plugin
parent816b56f878f0291c00a9018d5057b7b2b00f1891 (diff)
downloadrneovim-4ff3217bbd8747d2d44680a825ac29097faf9c4b.tar.gz
rneovim-4ff3217bbd8747d2d44680a825ac29097faf9c4b.tar.bz2
rneovim-4ff3217bbd8747d2d44680a825ac29097faf9c4b.zip
feat(lsp): add fswatch watchfunc backend
Problem: vim._watch.watchdirs has terrible performance. Solution: - On linux use fswatch as a watcher backend if available. - Add File watcher section to health:vim.lsp. Warn if watchfunc is libuv-poll.
Diffstat (limited to 'test/functional/plugin')
-rw-r--r--test/functional/plugin/lsp_spec.lua11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/functional/plugin/lsp_spec.lua b/test/functional/plugin/lsp_spec.lua
index 1610351090..1e787d2b0c 100644
--- a/test/functional/plugin/lsp_spec.lua
+++ b/test/functional/plugin/lsp_spec.lua
@@ -4494,6 +4494,15 @@ describe('LSP', function()
it(
string.format('sends notifications when files change (watchfunc=%s)', watchfunc),
function()
+ if watchfunc == 'fswatch' then
+ skip(
+ not is_ci() and fn.executable('fswatch') == 0,
+ 'fswatch not installed and not on CI'
+ )
+ skip(is_os('win'), 'not supported on windows')
+ skip(is_os('mac'), 'flaky')
+ end
+
skip(
is_os('bsd'),
'kqueue only reports events on watched folder itself, not contained files #26110'
@@ -4614,6 +4623,7 @@ describe('LSP', function()
test_filechanges('watch')
test_filechanges('watchdirs')
+ test_filechanges('fswatch')
it('correctly registers and unregisters', function()
local root_dir = '/some_dir'
@@ -5078,4 +5088,3 @@ describe('LSP', function()
end)
end)
end)
-