-
Notifications
You must be signed in to change notification settings - Fork 167
configurable debouncing delays #327
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'm open to tweaking that but I don't necessarily agree with that site that faster is better in that case. When typing the code, it is very often invalid until the user finished the statement or a line. So showing errors very quickly just results in flickering error highlights while the user is typing. Having a bigger delay mitigates that. The editor I'm using (Sublime Text) even applies an additional delay (when there are no diagnostics visible already) itself for that reason. |
EDIT: Ops, didn't read the whole thing. It actually measures how fast diagnostics are shown after editing the file. |
I personally want my tools (including error squigglies and syntax highlighting) to instantly respond to my keystrokes. I think it is a matter of preference.
Ideally there'd also be benchmarks for other metrics, such as power consumption. This would be more realistic and not subject to preference (as much). (Artificial delays wouldn't affect power consumption as much. In fact, they might improve power consumption, as less work needs to be done.) |
Neovim just got 150ms debounce built in to the nightly neovim/neovim#16908 for the LSP. Better to have it user-configurable here I think. |
Note, our delay is configurable. Empirically 150 ms seems to be lower than other editors/lsp plugins, so we thought it was a safe choice. |
TypeScript's LSP server has an artificial 200 ms debounce/delay:
typescript-language-server/src/lsp-server.ts
Line 316 in bb1c105
and an artificial 50 ms debounce/delay:
typescript-language-server/src/diagnostic-queue.ts
Lines 30 to 33 in bb1c105
I think this hard-coded delay makes TypeScript's LSP server look bad when compared to other LSP servers: https://quick-lint-js.com/benchmarks/
I think the delay should be user-configurable (e.g. disable-able or a custom delay).
The text was updated successfully, but these errors were encountered: