diff options
author | Lewis Russell <lewis6991@gmail.com> | 2024-05-10 13:47:30 +0100 |
---|---|---|
committer | Lewis Russell <me@lewisr.dev> | 2024-05-10 14:59:44 +0100 |
commit | c1a95d9653f39c5e118d030270e4b77ebd20139e (patch) | |
tree | 02a6fb993bbc5f11f2c6490403f204e27001a16d /runtime/lua/vim/lsp/protocol.lua | |
parent | ca735c7554701a1191e6afdac2ea4b4f94ba6d88 (diff) | |
download | rneovim-c1a95d9653f39c5e118d030270e4b77ebd20139e.tar.gz rneovim-c1a95d9653f39c5e118d030270e4b77ebd20139e.tar.bz2 rneovim-c1a95d9653f39c5e118d030270e4b77ebd20139e.zip |
fix(lsp): disable didChangeWatchedFiles on Linux
Problem:
The file watcher backends for Linux have too many limitations and
doesn't work reliably.
Solution:
disable didChangeWatchedFiles on Linux
Ref: #27807, #28058, #23291, #26520
Diffstat (limited to 'runtime/lua/vim/lsp/protocol.lua')
-rw-r--r-- | runtime/lua/vim/lsp/protocol.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/runtime/lua/vim/lsp/protocol.lua b/runtime/lua/vim/lsp/protocol.lua index 599f02425e..419c2ff644 100644 --- a/runtime/lua/vim/lsp/protocol.lua +++ b/runtime/lua/vim/lsp/protocol.lua @@ -10,6 +10,8 @@ local function get_value_set(tbl) return value_set end +local sysname = vim.uv.os_uname().sysname + -- Protocol for the Microsoft Language Server Protocol (mslsp) local protocol = {} @@ -835,7 +837,10 @@ function protocol.make_client_capabilities() refreshSupport = true, }, didChangeWatchedFiles = { - dynamicRegistration = true, + -- TODO(lewis6991): do not advertise didChangeWatchedFiles on Linux + -- or BSD since all the current backends are too limited. + -- Ref: #27807, #28058, #23291, #26520 + dynamicRegistration = sysname == 'Darwin' or sysname == 'Windows_NT', relativePatternSupport = true, }, inlayHint = { |