Highlight-only VS Code extension for the Arx programming language.
- TextMate syntax highlighting (
source.arx) for current Arx syntax:- Douki/YAML docstrings delimited by triple backticks, rendered with subdued documentation-comment scopes; keys stay muted while values use a slightly lighter gray-blue scope
#line comments- single-character literals and double-quoted strings
- numeric, boolean, and
noneliterals - functions, extern declarations, classes, type aliases, imports, assertions, loops, variables, and constants
- annotations (
@[...]) and template parameter blocks (@<...>) - current symbolic and word operators
- Basic language configuration:
- line comments (
#) with a slightly lighter Arx-specific comment-text scope - brackets (
(),{},[]) - auto-closing and surrounding pairs
- line comments (
- Arx logo assets:
- marketplace extension icon (
images/icon.png) - transparent monochrome file icons for
.xand.arxfiles: dark gray for light themes and light gray for dark themes
- marketplace extension icon (
This extension intentionally has no language server, commands, or runtime extension code.
Lexical rules are vendored from the main Arx repository:
packages/arx/src/arx/lexer/syntax.json
The vendored copy in this repository is:
syntax/arx.syntax.json
The vendored manifest is used to generate:
syntaxes/arx.tmLanguage.json
Builtin types, builtin functions, and declaration modifiers should come from the syntax manifest instead of being hardcoded in the grammar generator.
- Open this repo in VS Code.
- Regenerate the TextMate grammar:
npm run build:grammar- Press
F5to launch an Extension Development Host. - Open an
.xor.arxfile in the new window.
From this repo:
npm run sync:syntax
npm run check:grammarBy default, sync:syntax clones:
https://github.com/arxlang/arx.git- branch/ref
main
You can override source repo/ref:
ARX_REPO_URL=https://github.com/arxlang/arx.git \
ARX_REPO_REF=main \
npm run sync:syntaxTo sync from a local Arx checkout instead, copy the manifest and rebuild:
cp ../arx/packages/arx/src/arx/lexer/syntax.json syntax/arx.syntax.json
npm run build:grammar
npm run check:grammar- Update the canonical syntax manifest in the main Arx repo first.
- Sync or copy it into
syntax/arx.syntax.jsonhere. - Update
scripts/build-grammar.mjswhen the manifest shape or language forms change. - Run
npm run build:grammar. - Commit both generated artifacts:
syntax/arx.syntax.jsonsyntaxes/arx.tmLanguage.json
Avoid hand-editing syntaxes/arx.tmLanguage.json; it should be generated from
syntax/arx.syntax.json.
Releases are automated with semantic-release in
.github/workflows/release.yaml.
Prerequisites:
- Keep GitHub release tags in
0.2.0format;.releaserc.jsonusestagFormat: "${version}". - Add repository secrets:
VSCE_PATfor VS Code Marketplace.OVSX_PATfor Open VSX.
- Use Conventional Commits on
main:fix:publishes a patch release.feat:publishes a minor release.BREAKING CHANGE:publishes a major release.
Pushes to main run a semantic-release dry run. To publish, run the release
workflow manually from GitHub Actions.
Local release dry run:
npm run release:dry-runBuild a VSIX:
npm run build:vsixPublish both Marketplace and Open VSX:
export VSCE_PAT="***"
export OVSX_PAT="***"
npm run publish:allMarketplace only (bump patch):
export VSCE_PAT="***"
bash ./scripts/publish.sh --marketplace --bump patch --no-dependenciesThis repo includes .github/workflows/main.yaml with:
- PR branch freshness check.
- Script syntax validation.
- Grammar generation sync validation.
- Optional VSIX packaging and artifact upload when package metadata is ready.
It also includes .github/workflows/release.yaml with:
- Semantic-release dry runs on pushes to
main. - Manual semantic-release publishing to GitHub Releases, VS Code Marketplace, and Open VSX.
This repo uses .pre-commit-config.yaml for local checks before commit.
Install once:
python3 -m pip install pre-commit
pre-commit installRun manually on all files:
pre-commit run --all-filesIncluded hooks:
- JSON/YAML/basic whitespace checks.
npm run check:grammarwhen syntax/grammar generator files change.bash -nsyntax checks for shell scripts.
This extension registers both .x and .arx as Arx files.
- Keep
syntax/arx.syntax.jsonsynchronized with the main Arx syntax manifest. - Regenerate grammar (
npm run build:grammar). - Run checks (
npm run check:grammarand pre-commit where practical). - Open a PR with generated files included.