diff options
author | Michael Lingelbach <m.j.lbach@gmail.com> | 2022-01-05 08:36:35 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-05 08:36:35 -0800 |
commit | 55a59e56eda98f17448a1c318a346ae12d30fc05 (patch) | |
tree | b10b98f1355a9bb32af5ca6ec67272a462c06b7a /runtime/lua/vim/lsp.lua | |
parent | f65b0d4236eef69b02390a51cf335b0836f35801 (diff) | |
download | rneovim-55a59e56eda98f17448a1c318a346ae12d30fc05.tar.gz rneovim-55a59e56eda98f17448a1c318a346ae12d30fc05.tar.bz2 rneovim-55a59e56eda98f17448a1c318a346ae12d30fc05.zip |
feat(lsp): enable default debounce of 150 ms (#16908)
Diffstat (limited to 'runtime/lua/vim/lsp.lua')
-rw-r--r-- | runtime/lua/vim/lsp.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/runtime/lua/vim/lsp.lua b/runtime/lua/vim/lsp.lua index 72bda63b43..7df0064b6b 100644 --- a/runtime/lua/vim/lsp.lua +++ b/runtime/lua/vim/lsp.lua @@ -256,7 +256,7 @@ local function validate_client_config(config) (not config.flags or not config.flags.debounce_text_changes or type(config.flags.debounce_text_changes) == 'number'), - "flags.debounce_text_changes must be nil or a number with the debounce time in milliseconds" + "flags.debounce_text_changes must be a number with the debounce time in milliseconds" ) local cmd, cmd_args = lsp._cmd_parts(config.cmd) @@ -383,8 +383,8 @@ do return end local state = state_by_client[client.id] - local debounce = client.config.flags.debounce_text_changes - if not debounce then + local debounce = client.config.flags.debounce_text_changes or 150 + if debounce == 0 then local changes = state.use_incremental_sync and incremental_changes(client) or full_changes() client.notify("textDocument/didChange", { textDocument = { |