-
-
Notifications
You must be signed in to change notification settings - Fork 186
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
Error highlighting gives constant negative feedback #29
Comments
Increasing Some observations:
Originally, all text properties were cleared before parsing. I moved this clearing to right before the new errors are shown, after parsing. Starting with this, I see two approaches:
|
Interesting, seems like this could work. I have another suggestions which might be simpler, tho: How about all errors and warnings at point or beyond are delayed for 2-3 seconds while typing? I think that would take care of most issues. It's very rare that new warnings or parse errors pop up before point.
Yes, this is what I have been doing for a while now. It's what made me realize the 3rd requirement is so important.
To avoid errors while I was thinking, breaking my concentration. :-) I'm all for simplifying and using the same delay. |
Suppose we have a couple of warnings and an error in a block of code, and we decide to write something above it. The difference between checking if the warning is before the point, and checking if the text at a certain point has the same text property value, is not that big, so I'd try the latter approach first. |
When auto-complete is enabled it immediately triggers the error message no matter the idle timer delay value. So I'm constantly seeing "missing ; before statement" spurious messages. Is it possible to completely disable linting until I explicitly require it? Or at least to suppress the messages triggered by autocomplete? |
@memeplex By "auto-complete", do you mean Probably not: You could try Tern instead. |
Ah, you can also try |
Ok, I will just comment the reparse line there. Maybe I will ask the author to add an option to honour the idle timer delay, too. BTW, while debugging this issue I notice I'm getting a lot of no available AST messages (or something like that, I'm not at the pc right now). Is that expected? |
After commenting out the "reparse line"? Of course. That line is there for a reason. |
No, I've not commented that line yet. The error is just popping up all the time while debugging. |
Then probably not. But I guess that might depend on how you're doing the "debugging". |
I've just instrumented the ac-candidates function and entered the edebug stepper, then after each step I get the aforementioned message, as if it were triggered by a timer. Functionality related to the AST works fine though. The message is not shown outside the debugging session. |
It doesn't seem like the delay is working at all for me. When I type "function testing" it starts turning red as soon as I type the first letter of the function name with a 5.0 second timer. I'm on 24.4.1 on OS X with js2-mode version 20141105.154. Any suggestions? Is there anything I can provide to troubleshoot? |
Also +1 on the idea of hiding parse errors until the file is saved. |
|
I used the customize interface (M-x customize-group). Does that work? |
It should, yes. |
The constant negative feedback from the error highlighting while I'm typing is bugging me. It's like the small happy green tests in TDD - except in reverse.
I've got several ideas about fixing it, but I'm unsure of how feasible they are. I've tried making the error highlighting only show up on saved files. I thought that would be easiest, but couldn't get it to work.
What I would like most of all is this:
And here's the crux:
Do you think these fixes are feasible? Or at all possible with the way parsing works now?
I'd love to help out, but would need a little push in the right direction. :-)
The text was updated successfully, but these errors were encountered: