Add TextMate bundle for Vera syntax highlighting#364
Conversation
TextMate 2 grammar covering the full Vera language: slot references, contracts, effects, ADT constructors, string interpolation, and all operators. Compatible with Sublime Text and other tmLanguage consumers. - editors/textmate/Vera.tmbundle — the bundle directory - editors/textmate/README.md — installation and scope reference - README.md: Editor Support section with install instructions - docs/index.html: TextMate icon + download link with attribution Co-Authored-By: Claude <noreply@anthropic.invalid>
📝 WalkthroughWalkthroughAdds a TextMate syntax bundle and docs for the Vera language, updates the root README to list editor support and example count, and adjusts a README code-fence allowlist entry line number in test and script files. Changes
Sequence Diagram(s)(omitted) Estimated code review effort🎯 3 (Moderate) | ⏱️ ~30 minutes Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #364 +/- ##
=======================================
Coverage 90.32% 90.32%
=======================================
Files 49 49
Lines 18999 18999
Branches 219 219
=======================================
Hits 17161 17161
Misses 1834 1834
Partials 4 4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@editors/textmate/Vera.tmbundle/Syntaxes/Vera.tmLanguage`:
- Around line 93-106: The current TextMate grammar rules
variable.other.slot.vera and variable.other.slot-binding.vera use the match
patterns "@[A-Z][A-Za-z0-9_]*(?:<[^>]*>)*\.(?:result|\d+)" and
"@[A-Z][A-Za-z0-9_]*(?:<[^>]*>)*(?=\s*[,)\]}])" which cannot handle
nested generics (e.g., `@Array`<Option<Int>>.0) because the
"(?:<[^>]*>)*" stops at the first '>'; add a short note to
editors/textmate/README.md documenting this known regex limitation and listing
the affected patterns and scopes (variable.other.slot.vera and
variable.other.slot-binding.vera), and state that nested generics are an
accepted edge case rather than attempting an impractically complex regex.
- Around line 191-197: Update the built-in ADT types regex in the dict whose
name is "storage.type.adt.vera" (the match currently is
"\b(MdBlock|MdInline|UrlParts)\b") to include HtmlNode by adding it to the
alternation (e.g. "\b(MdBlock|MdInline|UrlParts|HtmlNode)\b"), preserving the
word boundaries and existing pattern formatting so references to HtmlNode are
scoped as storage.type.adt.vera.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 21b73090-8ed4-4af5-abca-6c0ed4004f0b
⛔ Files ignored due to path filters (2)
docs/index.htmlis excluded by!docs/**docs/textmate-icon.pngis excluded by!**/*.png,!docs/**
📒 Files selected for processing (6)
README.mdeditors/textmate/README.mdeditors/textmate/Vera.tmbundle/Syntaxes/Vera.tmLanguageeditors/textmate/Vera.tmbundle/info.plistscripts/check_readme_examples.pytests/test_readme.py
Tighten icon-text gap, left-align trademark line under download text, link MacroMates name to macromates.com. Remove duplicate Editor Support section from Get Started (hero placement is sufficient). Add MacroMates credit to README. Co-Authored-By: Claude <noreply@anthropic.invalid>
Same format as hero: icon + download link + trademark line, no heading, tight spacing under the CLI code block. Co-Authored-By: Claude <noreply@anthropic.invalid>
Co-Authored-By: Claude <noreply@anthropic.invalid>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@editors/textmate/Vera.tmbundle/Syntaxes/Vera.tmLanguage`:
- Around line 251-257: The constructor match list for the ADT highlighting rule
(the dict with name "entity.name.tag.constructor.vera" and its match regex) is
missing the HtmlNode constructors; update the regex in the <key>match</key>
string to include HtmlElement, HtmlText, and HtmlComment (keeping the existing
\b word boundaries and the single alternation group) so those constructors are
highlighted alongside the other ADT constructors.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 929717c2-3f82-4524-bc23-52a1be230fe8
⛔ Files ignored due to path filters (1)
docs/index.htmlis excluded by!docs/**
📒 Files selected for processing (2)
editors/textmate/README.mdeditors/textmate/Vera.tmbundle/Syntaxes/Vera.tmLanguage
…ghting Co-Authored-By: Claude <noreply@anthropic.invalid>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@editors/textmate/Vera.tmbundle/Syntaxes/Vera.tmLanguage`:
- Around line 142-148: The pattern keyword.other.forall.vera currently uses
\b(forall)\b which shadows the more specific quantifier pattern
\b(forall|exists)\b(?=\s*\() and leaves standalone exists unhighlighted; fix by
either adding exists to the general keyword pattern (change \b(forall)\b to
\b(forall|exists)\b in the dict with name "keyword.other.forall.vera") OR remove
forall from that general pattern so the quantifier-specific rule (the dict using
\b(forall|exists)\b(?=\s*\()) can exclusively handle both tokens including
standalone exists; update only the regex in the referenced dict accordingly.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 1fd4d2f1-89a5-4d1d-9e8d-ae65a9442c8b
📒 Files selected for processing (1)
editors/textmate/Vera.tmbundle/Syntaxes/Vera.tmLanguage
| <!-- Generic / polymorphism keyword --> | ||
| <dict> | ||
| <key>name</key> | ||
| <string>keyword.other.forall.vera</string> | ||
| <key>match</key> | ||
| <string>\b(forall)\b</string> | ||
| </dict> |
There was a problem hiding this comment.
🧹 Nitpick | 🔵 Trivial
forall is defined twice; exists won't highlight standalone.
forall appears in two patterns:
- Line 147:
\b(forall)\b— matches anywhere - Line 410:
\b(forall|exists)\b(?=\s*\()— matches only when followed by(
Since TextMate uses first-match semantics, line 147 always wins for forall, making the quantifier-specific scope at line 410 unreachable for forall. Meanwhile, exists is only in the quantifier pattern, so exists without a following ( receives no highlighting at all.
Consider either:
- Adding
existsto the general keyword list at line 147, or - Removing
forallfrom line 147 if the intent is quantifier-specific scoping.
Option 1: Add exists to general keywords
<!-- Generic / polymorphism keyword -->
<dict>
<key>name</key>
<string>keyword.other.forall.vera</string>
<key>match</key>
- <string>\b(forall)\b</string>
+ <string>\b(forall|exists)\b</string>
</dict>Also applies to: 405-411
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@editors/textmate/Vera.tmbundle/Syntaxes/Vera.tmLanguage` around lines 142 -
148, The pattern keyword.other.forall.vera currently uses \b(forall)\b which
shadows the more specific quantifier pattern \b(forall|exists)\b(?=\s*\() and
leaves standalone exists unhighlighted; fix by either adding exists to the
general keyword pattern (change \b(forall)\b to \b(forall|exists)\b in the dict
with name "keyword.other.forall.vera") OR remove forall from that general
pattern so the quantifier-specific rule (the dict using
\b(forall|exists)\b(?=\s*\()) can exclusively handle both tokens including
standalone exists; update only the regex in the referenced dict accordingly.
Summary
What gets highlighted
Slot references, contract blocks, effects, ADT constructors, qualified calls, string interpolation, operators, comments. The .tmLanguage format is also compatible with Sublime Text.
Test plan
🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Documentation
Chores