
Hello,
We are using the automatic error squiggle lines and is working pretty good. However, we notice the red squiggle lines appear too quick as the user is typing. Is there a way to wait a bit until the user is somewhat done typing?
Hello,
We are using the automatic error squiggle lines and is working pretty good. However, we notice the red squiggle lines appear too quick as the user is typing. Is there a way to wait a bit until the user is somewhat done typing?
Hi Josh,
I assume your squiggles are coming from parse errors generated by your syntax language's parser? If so, the squiggles are generated by a ParseErrorTagger language service when the document.ParseDataChanged event fires. You can't really delay that, at least the built-in functionality for it, but you could add a slight thread delay to your parser if it finishes too quickly. That isn't an ideal thing though because other features like IntelliPrompt, generally benefit more from a quick parser.
The only other option would be to write your own ParseErrorTagger-like class instead of using ours and add some form of throttling into that. The design summary of ParseErrorTagger is that it watches for the document.ParseDataChanged event, and when that fires, it updates all its tagged ranges by examining the document.ParseData to see if it implements IParseErrorProvider. Then it scans through the errorProvider.Errors collection and converts each error's position range to an offset range (via the errorProvider.Snapshot), and creates an ISquiggleTag for the parse error, adding it to the tagger.
Please log in to a validated account to post comments.