creating-editor-taggers

Implement ITagger and ITaggerProvider annotating spans with tag types for Visual Studio extensions.

14|2|Updated Mar 24, 2026
One-click install
npx skills add https://github.com/madskristensen/vs-agent-plugins --skill creating-editor-taggers
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: creating-editor-taggers
Source: https://github.com/madskristensen/vs-agent-plugins/tree/main/skills/creating-editor-taggers
Command: npx skills add https://github.com/madskristensen/vs-agent-plugins --skill creating-editor-taggers

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Taggers annotate text spans with tags to drive editor visuals such as squiggles, outlining, and text markers in Visual Studio extensions.

Core Features & Use Cases

  • Implement ITagger<T> to provide tagging data for a given text buffer.
  • Expose taggers via ITaggerProvider and support tag types like IErrorTag, IOutliningRegionTag, and TextMarkerTag across VisualStudio.Extensibility, VSIX Community Toolkit, and VSSDK.
  • Use cases include error highlighting, code folding, and decorative text markers in custom languages or tooling.

Quick Start

Create a minimal in-solution tagger that highlights a keyword with ITagger and wires it to an ITaggerProvider.

Frequently Asked Questions about creating-editor-taggers

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement editor taggers for error squiggles and code folding in Visual Studio extensions?

To implement editor taggers, create an ITagger<T> to annotate text spans with tags like IErrorTag or IOutliningRegionTag, then expose them via a MEF-based ITaggerProvider to drive editor visuals in Visual Studio extensions.

What is the difference between ITagger and ITaggerProvider in Visual Studio?

ITagger<T> provides the tagging data for a given text buffer by annotating text spans, while ITaggerProvider is the MEF-based factory that instantiates taggers and exposes them to the Visual Studio editor framework for rendering visuals.

Can I use taggers with VisualStudio.Extensibility and the VSIX Community Toolkit?

Yes, taggers can be implemented across out-of-process and in-process models, supporting VisualStudio.Extensibility, VSIX Community Toolkit, and VSSDK to generate editor visuals like error squiggles and text markers.

How do I add text markers and outlining regions to a custom language extension?

Implement ITagger<T> with TextMarkerTag for decorative highlights or IOutliningRegionTag for code folding, then wire the tagger to an ITaggerProvider to render the visual spans within your custom language tooling.

Which tag types are supported for annotating text spans in Visual Studio editor extensions?

Supported tag types include IErrorTag for error squiggles, IOutliningRegionTag for code folding regions, and TextMarkerTag for decorative text markers, all driven through ITagger<T> implementations.

Do I need MEF to expose taggers in Visual Studio extensions?

Yes, MEF-based exposure is required to wire ITaggerProvider implementations to the Visual Studio editor, ensuring the taggers are discovered and instantiated to supply tagging data for the text buffers.