A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/neovim/neovim/commit/55a59e56eda98f17448a1c318a346ae12d30fc05 below:

enable default debounce of 150 ms (#16908) · neovim/neovim@55a59e5 · GitHub

File tree Expand file treeCollapse file tree 3 files changed

+9

-6

lines changed

Filter options

Expand file treeCollapse file tree 3 files changed

+9

-6

lines changed Original file line number Diff line number Diff line change

@@ -887,10 +887,10 @@ start_client({config}) *vim.lsp.start_client()*

887 887

default true): Allow using

888 888

incremental sync for buffer edits

889 889

• debounce_text_changes (number,

890 -

default nil): Debounce didChange

890 +

default 150): Debounce didChange

891 891

notifications to the server by the

892 892

given number in milliseconds. No

893 -

debounce occurs if nil

893 +

debounce occurs if set to 0.

894 894

• exit_timeout (number, default 500):

895 895

Milliseconds to wait for server to

896 896

exit cleanly after sending the

Original file line number Diff line number Diff line change

@@ -256,7 +256,7 @@ local function validate_client_config(config)

256 256

(not config.flags

257 257

or not config.flags.debounce_text_changes

258 258

or type(config.flags.debounce_text_changes) == 'number'),

259 -

"flags.debounce_text_changes must be nil or a number with the debounce time in milliseconds"

259 +

"flags.debounce_text_changes must be a number with the debounce time in milliseconds"

260 260

)

261 261 262 262

local cmd, cmd_args = lsp._cmd_parts(config.cmd)

@@ -383,8 +383,8 @@ do

383 383

return

384 384

end

385 385

local state = state_by_client[client.id]

386 -

local debounce = client.config.flags.debounce_text_changes

387 -

if not debounce then

386 +

local debounce = client.config.flags.debounce_text_changes or 150

387 +

if debounce == 0 then

388 388

local changes = state.use_incremental_sync and incremental_changes(client) or full_changes()

389 389

client.notify("textDocument/didChange", {

390 390

textDocument = {

Original file line number Diff line number Diff line change

@@ -73,8 +73,11 @@ local function fake_lsp_server_setup(test_name, timeout_ms, options)

73 73

on_init = function(client, result)

74 74

TEST_RPC_CLIENT = client

75 75

vim.rpcrequest(1, "init", result)

76 -

client.config.flags.allow_incremental_sync = options.allow_incremental_sync or false

77 76

end;

77 +

flags = {

78 +

allow_incremental_sync = options.allow_incremental_sync or false;

79 +

debounce_text_changes = 0;

80 +

};

78 81

on_exit = function(...)

79 82

vim.rpcnotify(1, "exit", ...)

80 83

end;

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4