public BraceMatchingTagger(BackgroundParser backgroundParser, ITextView textView, BraceMatcher braceMatcher) { backgroundParser.RegisterSyntaxTreeHandler(BackgroundParserHandlerPriority.Medium, this); textView.Caret.PositionChanged += OnCaretPositionChanged; _textView = textView; _braceMatcher = braceMatcher; }
public BraceMatchingTagger(BackgroundParser backgroundParser, ITextView textView, BraceMatcher braceMatcher) { backgroundParser.SubscribeToThrottledSyntaxTreeAvailable(BackgroundParserSubscriptionDelay.NearImmediate, async x => await InvalidateTags(x.Snapshot, x.CancellationToken)); textView.Caret.PositionChanged += OnCaretPositionChanged; _textView = textView; _braceMatcher = braceMatcher; }