textmate-grammar

Author TextMate grammars for Lea syntax highlighting in editors.

4|Updated Dec 8, 2025
One-click install
npx skills add https://github.com/mcclowes/lea --skill textmate-grammar
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: textmate-grammar
Source: https://github.com/mcclowes/lea/tree/main/.claude/skills/textmate-grammar
Command: npx skills add https://github.com/mcclowes/lea --skill textmate-grammar

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

You can author TextMate grammars to enable Lea syntax highlighting in editors.

Core Features & Use Cases

  • Scope naming: Follow Lea scope conventions
  • Patterns: Match/begin-end patterns for tokens
  • Testing: Inspector with VSCode

Quick Start

Build a simple Lea grammar file and validate with VSCode inspector.

Frequently Asked Questions about textmate-grammar

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

FAQPage Schema
How do I create syntax highlighting for Lea in VSCode or other editors?

Author a TextMate grammar file that defines tokenization rules for Lea syntax. TextMate grammars use regex patterns and scope names to highlight tokens like operators, keywords, and type annotations across editors that support the TextMate format, including VSCode.

What are TextMate grammars and how do they enable syntax highlighting?

TextMate grammars are configuration files that use regex patterns and scope naming to tokenize source code. They map syntax elements to semantic scopes, which editors render as colors and styles. TextMate grammars work across VSCode, Sublime Text, and other compatible editors.

How do I test and validate a Lea grammar file in VSCode?

Use VSCode's built-in scope inspector to test tokenization rules. Load your grammar file, inspect highlighted tokens to verify scopes match your patterns, and validate match/begin-end patterns and captures against actual Lea syntax.

Can I highlight Lea-specific syntax like pipe operators and decorators in my grammar?

Yes. TextMate grammars support custom patterns for language-specific syntax. Define match or begin-end patterns for Lea pipe operators, decorators, and type annotations, then assign appropriate scopes so editors render them correctly.

What scope naming conventions should I follow when authoring a Lea grammar?

Follow TextMate scope naming conventions tailored for Lea. Use standard scope hierarchies like keyword, operator, and type-annotation to ensure consistent highlighting and compatibility with editor color themes.

How do I organize repository patterns in a TextMate grammar file?

Structure your grammar using a repository section to group reusable patterns by category—keywords, operators, comments, strings. Reference repository patterns within main rules and includes to keep the grammar modular and maintainable.