-
Notifications
You must be signed in to change notification settings - Fork 32
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
Change default of onSave
to true
?
#55
Comments
Oh, I just realized, this setting is a bit buggy sometimes. Sometimes TypeScript diagnostics come back slowly after save, and the extension does not update them. For example, here the diagnostics from TypeScript are already gone and resolved (no squiggly underlines), but the lenses are still there 😟 I guess this would need to be fixed if it would become the default... If I should open another issue for this, happy to do so. |
Changing the default won't happen because I believe a lot of people are using vscode setting
This can be easily added.
Do you have an approximate time of how slow they are? I can increase interval at vscode-error-lens/src/eventListeners.ts Line 38 in 0679076
from 1000 to, perhaps, 3000. But this will make all the diagnostics change events to render for 3 seconds after the save. Can possibly add a setting for this delay. |
Ah, that's understandable. How about setting default to:
Ah yeah this is very different, based on a lot of factors (size of the project, what else is running on the computer, etc). I guess a callback-based approach would be better. I don't know too much about VS Code extension development, but maybe using a "save provider" or similar would work? I'm thinking, some way to do work after all other save providers have done things. Some ideas:
|
Ok I split out the one request into a separate issue (#57) here for easier tracking:
|
You can try it out and leave feedback if it works better than before: Change file extension from The default value of |
Trying this now, and it is working well, thanks! 🙌 Since the default will stay with I guess |
I've also asked the VS Code project whether they'd be open for adding a |
I don't think it works that way. The diagnostic changes when the document changes - it doesn't know/care about document saves. |
I suppose that is possible. It would be nice to be able to trace the diagnostic change event back to what event caused them though (kind of like a stack trace). |
Hi there, first of all, thanks so much for this extension. Saves so much time and is great for teaching!
I was wondering if you would consider a change of the default of the
onSave
option totrue
instead offalse
. It would make the "out of the box" UX much nicer, since the lens won't complain about errors as you are still typing.Just trying this option out, I see that it doesn't extend to files that have just been opened. Maybe this could also be part of the default? I'm thinking of a default behavior something like:
What are your thoughts?
The text was updated successfully, but these errors were encountered: