feat: add jac.toml syntax highlighting (jactoml language)#83
Merged
kugesan1105 merged 1 commit intoMay 20, 2026
Merged
Conversation
kugesan1105
force-pushed
the
feat/jactoml-highlighting
branch
4 times, most recently
from
May 20, 2026 12:37
501daf8 to
e77c6a6
Compare
Registers a new 'jactoml' language with exact-filename match on
'jac.toml' so every Jaseci project manifest gets proper highlighting
out of the box. Won't touch pyproject.toml, Cargo.toml, etc.
Grammar (syntaxes/jactoml.tmLanguage.json):
- Every table header [...] and [[...]] at any dotted depth is
captured as one whole-path token under
entity.name.tag.jac-known.jactoml. No allowlist, no per-segment
splitting: [dependencies.npm], [plugins.scale.sso.github],
[[plugins.scale.microservices.shared_volumes]] all behave
identically.
- Incomplete '[table' lines (mid-edit) are tagged
invalid.illegal.table.jactoml on the offending line only, so the
color cascade that would otherwise hit every line below is
prevented.
- Shell-style env placeholders (${VAR} and bare $VAR) inside any
string flavor (basic/literal x line/block) are scoped as
variable.other.env.jactoml.
Language configuration (language-configuration.jactoml.json):
- '#' line-comment toggling, bracket matching, autoclose, surround.
Bonus fix: 'Jac: Inspect Token Scopes' was broken
- Existing command threw ENOENT on vendor/onig.wasm on every install
because the wasm was never copied out of node_modules (which
.vscodeignore excludes from the .vsix).
- New copy-wasm npm script (run from both compile and package)
copies the wasm into vendor/onig.wasm. vendor/ is gitignored,
so it's a build artifact.
- Inspector handler generalised to recognise both 'jac' and
'jactoml' languages, picking the correct grammar/scope by
languageId.
Test coverage:
- 250 unit tests pass.
- Covers: universal table capture, dotted paths, arrays-of-tables,
arbitrary non-allowlisted names, ${VAR}/$VAR placeholders in
every string flavor, incomplete-bracket recovery, multiline
strings, dotted-key-vs-table trap, deep nesting, inline tables,
datetime values, empty tables.
kugesan1105
force-pushed
the
feat/jactoml-highlighting
branch
from
May 20, 2026 12:40
e77c6a6 to
5d85593
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a dedicated
jactomllanguage to the extension so everyjac.tomlproject manifest in the Jaseci ecosystem (jaclang, jacBuilder, jac-scale, jac-byllm, jac-mcp, jac-super, jac-client, jaseci-package, docs, …) gets proper highlighting out of the box, with no dependency on another TOML extension.jactomlregistered with exact filename match onjac.toml(won't touchpyproject.toml,Cargo.toml, etc.).[...]and[[...]](any name, any dotted depth) is captured as one token underentity.name.tag.jac-known.jactoml, so the entire header renders in a single uniform color — no allowlist, no per-segment splitting ([dependencies.npm],[plugins.scale.sso.google],[[plugins.scale.microservices.shared_volumes]]all behave identically).[tableheaders (mid-edit) are taggedinvalid.illegal.table.jactomlon the offending line only — no cascading color loss to lines below.${ECR_REGISTRY},$HOST) inside any string flavor are scoped asvariable.other.env.jactoml.#comments, bracket pairs, autoclose, surround).jac.tomlsupport.Bonus fix:
Jac: Inspect Token Scopeswas brokenExisting command threw
ENOENT: .../vendor/onig.wasmon every published install because the wasm was never copied out ofnode_modules(which.vscodeignoreexcludes from the .vsix). Fixed by:copy-wasmnpm script (run from bothcompileandpackage) that copiesnode_modules/vscode-oniguruma/release/onig.wasmintovendor/onig.wasm.vendor/is gitignored, so the wasm is a build artifact, not a committed binary.jac(.jac) andjactoml(jac.toml) languages, picking the correct grammar and scope automatically.