You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I bumped up the LSC 500ms debounce timer to 2 seconds during my testing.
At the same time I setup Solargraph to real time log input and output events as noted in the LSC debug documentation.
At the above <<INSERT-CONTENT-HERE>> position if I type FooBarFooBarFooBarFooBarFooBar then LSC debounces textDocument/didChange requests. Noting that FooBar matches the class name in the buffer. Only one textDocument/didChange event is sent, and no textDocument/completion event (after the Foo prefix is sent, noting LSC by default waits until the third character).
If instead I type BarFooBarFooBarFooBarFooBarFoo then LSC sends a textDocument/didChange and textDocument/completion pairs after every character typed (from the third character onwards). Noting that Bar prefix does not match anything.
It seems if a three character prefix produces completion matches then debouncing happens for characters typed after the prefix. If the prefix does not produce completion matches then LSC sends a textDocument/didChange and textDocument/completion pair for every typed character after the prefix.
My expectation is that debouncing should occur in both instances.
Best regards.
The text was updated successfully, but these errors were encountered:
Hello Nate,
I have journeyed down a debounce rabbit hole.
LSC does debounce, but not always. My query is about the times LSC does not appear to debounce whilst a user is typing content.
I have been experimenting with the Ruby language server, Solargraph, and this example Ruby sample file:
I bumped up the LSC 500ms debounce timer to 2 seconds during my testing.
At the same time I setup Solargraph to real time log input and output events as noted in the LSC debug documentation.
At the above
<<INSERT-CONTENT-HERE>>
position if I typeFooBarFooBarFooBarFooBarFooBar
then LSC debouncestextDocument/didChange
requests. Noting thatFooBar
matches the class name in the buffer. Only onetextDocument/didChange
event is sent, and notextDocument/completion
event (after theFoo
prefix is sent, noting LSC by default waits until the third character).If instead I type
BarFooBarFooBarFooBarFooBarFoo
then LSC sends atextDocument/didChange
andtextDocument/completion
pairs after every character typed (from the third character onwards). Noting thatBar
prefix does not match anything.It seems if a three character prefix produces completion matches then debouncing happens for characters typed after the prefix. If the prefix does not produce completion matches then LSC sends a
textDocument/didChange
andtextDocument/completion
pair for every typed character after the prefix.My expectation is that debouncing should occur in both instances.
Best regards.
The text was updated successfully, but these errors were encountered: