Closed jhossbach closed 2 years ago
The debounce text changes doesn't work as your expectation.
It's debouncing textDocument/didChange
request but nvim-cmp will send textDocument/completion
for each key press (if the language server specifies isIncomplete=true
).
The textDocument/didChange
should be requested before the other LSP requests because the server needs to know the latest text content
before the processing other LSP requests.
So it isn't a bug.
Thank you for the answer. Is there any way do debounce the textDocument/completion
event as well?
No. Currently, debouncing completion wasn't provided and I have no plan adding it.
Describe the bug The
debounce_text_changes
flag is ignored whennvim-lsp
is added as source forcmp
.Minimal config based on this:
To Reproduce
Expected behavior The error is shown after the 5 second period given as the
debounce_text_changes
flag. However, this is not the case ifnvim-lsp
is commented out as source.Additional context I am using NVIM v0.6.0-dev+518-g1dbbaf89b