-
Notifications
You must be signed in to change notification settings - Fork 94
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
diagnostics should show less aggressively when typing code in an editor #979
Comments
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
We're going to deal with the Console in a different issue #1114, this one will remain focused on the speed of which diagnostics show up while you're typing in the editor. |
Moving this to after Alpha but keeping the priority high as the experience doesn't meet our expectations for release. |
Would a simple first approach be to just not show diagnostics on the current line? Would this be too much to suppress? |
This came up during our alpha user feedback session. The specific situation cited was opening a quote for a string, which causes the rest of your file to suddenly get highlighted as a string (huge color change which feels like flashing). |
Shouldn't this normally be handled by auto-pairing of quote characters? I think RStudio also dodges a bit of this pain by delaying the highlight / tokenization of lines later in the document; waiting for the user to be idle for ~700ms or so. |
At least in Python, we currently have a very happy trigger finger with showing diagnostics (both in the console and in the source editor, though we're dealing with the console in a separate issue #1114). For example, if you simply enter this:
You will get a red underline indicating an "error" in your code:
Especially for less experienced developers I think this will be at best annoying and at worst provoke users to actually figure out "what's wrong" with the code they just entered.
I think we need a fancier set of heuristics for when to show diagnostics around active edits. One thing I've seen work well is to never show diagnostics on the line where the cursor currently is. We could also never show diagnostics if the current line is empty. Another thing we could do is have diagnostics run debounced over a longer period (e.g. 3 seconds). The goal is to never mis-detect and incomplete edit as an error or warning.
We'll need to play around with different strategies in order to get this just right.
The text was updated successfully, but these errors were encountered: