Open SuspiciousLookingOwl opened 3 years ago
The diagnostics delay is purposefully higher than for TS. The reason is that TS is able to cancel the compution of diagnostics if keystroke is registered. This is private API however, which we have no access to, so we can't cancel this potentially heavy computation. We added some smarter debounce handling since that decision however, so we might as well try how it performs now when lowering the delay a little. I'm very hesitant to make this configurable.
The intellisense was lowered to 750 miliseconds delay. Please let me know if this is better for you now.
It feels better, but is there any reason why you're hesitant to make this configurable? I think it's nice to have an option for developers with beefier PC to experience more responsive diagnostic.
Edit: after short look at the source code, my guess is it's not as straightforward to implement
It's okay to set the default value to 1000ms, but please make this configurable.
If you wanna try to experience more responsive diagnostic result, you can edit the extension source code manually by following these steps (make sure you have Svelte for VS Code extension installed on your VS Code):
Windows
%USERPROFILE%\.vscode\extensions
macOS~/.vscode/extensions
Linux~/.vscode/extensions
svelte.svelte-vscode-xxx.x.x\node_modules\svelte-language-server\dist\src\server.js
docManager.on('documentChange', utils_1.debounceThrottle(async (document) => diagnosticsManager.update(document), 750));
and modify the debounce delay (750
) to whichever you like.
I wouldn't say I recommend you to do this, but if you really want to have more responsive diagnostic result, the above steps works.
I set mine to 500
and it feels much better. 350
feels amazing but I think 500
should be fine for most people.
Is your feature request related to a problem? Please describe. Svelte extension in VSCode seems to have 1 second debounce delay between checking
Compared to TypeScript which is around 500ms
for some developer 1s delay is too long or doesn't feel responsive
Describe the solution you'd like It would be nice to be able to change the debounce value to provide more responsive checking for developer with beefier machine
Additional context I'm using Svelte VSCode v105.3.4 and those are my
devDependencies
(default fromnpm init svelte@next my-app
with TS + Eslint + Prettier)