private ITagger <IClassificationTag> CreateTagger(ITextView textView, ITextBuffer buffer)
 {
     return(new ModeAwareTagger(
                () => this._textMateProvider.Value.CreateTagger <IClassificationTag>(textView, buffer),
                () => this._serverProvider.Value.CreateTagger <IClassificationTag>(textView, buffer),
                SyntacticClassificationModeSelector.GetModeSelector(_lspClientServiceFactory, buffer)));
 }
Example #2
0
        public ModeAwareTagger(
            Func <ITagger <IClassificationTag> > createTextMateTagger,
            Func <ITagger <IClassificationTag> > createServerTagger,
            SyntacticClassificationModeSelector modeSelector)
        {
            this._modeSelector = modeSelector;

            this._textMateTagger = new Lazy <ITagger <IClassificationTag> >(() => CreateTagger(createTextMateTagger));
            this._serverTagger   = new Lazy <ITagger <IClassificationTag> >(() => CreateTagger(createServerTagger));
        }