Add VS Code extension for Vera syntax highlighting#365
Conversation
- Add editors/vscode/ — VS Code language extension with syntax highlighting and language configuration for .vera files - Grammar covers full Vera as of v0.0.100: slot references, contracts, effects (IO/State/Exn/Http/Async/Diverge), ADT constructors including HtmlNode/HtmlElement/HtmlText/HtmlComment, string interpolation, nestable block comments, all operators - Fix package.json URLs (repository/bugs → aallan/vera, not vera-vscode) - Fix README.md: clone from main vera repo, symlink from editors/vscode/, TextMate bundle link to editors/textmate in this repo - Add editors/README.md listing both VS Code and TextMate packages - Add docs/vscode-icon.png (CC BY-SA 4.0, Wikimedia Commons) - Update docs/index.html: remove duplicate TextMate shoutout from hero section; add VS Code shoutout alongside TextMate in Get Started section - Update README.md editor support section to lead with VS Code - Fix stale allowlist line number after README edit Co-Authored-By: Claude <noreply@anthropic.invalid>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughA VS Code language extension and supporting TextMate grammar for Vera are added under Changes
Sequence Diagram(s)(omitted — changes are documentation and editor integration files; no new runtime control flow across multiple runtime components to visualise) Estimated Code Review Effort🎯 2 (Simple) | ⏱️ ~12 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 |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 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/vscode/README.md`:
- Around line 28-33: The README currently documents a symlink using the path
"$(pwd)/vera/editors/vscode" which only works when run from the parent of the
repo; update the docs to show two correct workflows: keep the existing
clone+symlink example for running from the parent, and add the alternative
symlink command using "$(pwd)/editors/vscode" for users who are already in the
repository root (reference the exact strings "$(pwd)/vera/editors/vscode" and
"$(pwd)/editors/vscode" in the README entry to make the distinction explicit).
- Line 68: The scope table documents the pipe operator incorrectly as `\|>`;
update the table row that uses the symbol `\|>` to instead use the actual
operator `|>` so the mapping to `keyword.operator.pipe.vera` is accurate (search
for the table entry containing `\|>` and replace it with `|>` in
editors/vscode/README.md).
In `@editors/vscode/syntaxes/vera.tmLanguage.json`:
- Around line 120-131: The current regex match
"\\b([A-Z][A-Za-z0-9_]*)(\\.)([a-z_][a-z_0-9]*)\\b" (which assigns the
"entity.name.function.effect-op.vera" capture) is too broad; narrow it so only
effect-qualified calls are matched. Replace this single generic rule with a
two-step approach: (1) add a rule to explicitly capture effect
declarations/names (store them in a repository or tag them as
"entity.name.type.effect.vera"), and (2) change the effect-op matcher to only
match when the qualifier is one of those effect names (or, as a simple
narrowing, require the qualifier to follow an explicit effect naming convention
such as ending with "Effect" or be matched via a lookbehind/backreference),
keeping the same capture names ("1" = effect type, "2" =
punctuation.accessor.vera, "3" = entity.name.function.effect-op.vera). Ensure
you remove or replace the broad "\\b([A-Z]...)(\\.)([a-z_]...)" rule so regular
qualified names are no longer highlighted as effect operations.
🪄 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: e44a9772-ee16-4181-9ab1-4c994616f4b5
⛔ Files ignored due to path filters (4)
docs/index.htmlis excluded by!docs/**docs/sitemap.xmlis excluded by!docs/**docs/vscode-icon.pngis excluded by!**/*.png,!docs/**editors/vscode/images/vera-icon.pngis excluded by!**/*.png
📒 Files selected for processing (12)
README.mdeditors/README.mdeditors/vscode/.gitignoreeditors/vscode/.vscodeignoreeditors/vscode/CHANGELOG.mdeditors/vscode/LICENSEeditors/vscode/README.mdeditors/vscode/language-configuration.jsoneditors/vscode/package.jsoneditors/vscode/syntaxes/vera.tmLanguage.jsonscripts/check_readme_examples.pytests/test_readme.py
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #365 +/- ##
=======================================
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:
|
- Split installation into fresh-clone vs existing-clone cases to clarify the correct $(pwd) base in each scenario - Fix pipe operator in scope table: \|> -> |> (stray escape char) Co-Authored-By: Claude <noreply@anthropic.invalid>
|
Addressed the three CodeRabbit comments: 1. Symlink path ambiguity (#3001223057) — Fixed. Split installation into two explicit cases (fresh clone vs. existing clone from repo root) so the 2. Pipe operator escape (#3001223076) — Fixed. 3. Effect matcher too broad (#3001223082) — Keeping as-is. In Vera, the |
Summary
editors/vscode/— a full VS Code language extension for.verafiles (syntax highlighting + language configuration)HtmlNode/HtmlElement/HtmlText/HtmlComment(the original was written against v0.0.67 — these were missing)package.json(vera-vscode→vera)editors/vscode/editors/README.mdlisting both VS Code and TextMate packages (with Sublime Text compatibility note)docs/index.html: removes duplicate TextMate shoutout from hero section; adds VS Code shoutout alongside TextMate in Get StartedREADME.mdeditor support section to include VS Code alongside TextMatedocs/vscode-icon.png) sourced from Wikimedia Commons, CC BY-SA 4.0Test plan
.verafile in VS Code to confirm highlighting🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Documentation
Tests / Chores