Port of the ziran-vscode 0.6.3 TextMate grammar to an Atom package: grammars/ziran.json (scope source.ziran, fileTypes zi), editor settings for // comments and brace indentation, README and MIT license. Co-Authored-By: Claude Fable 5.1 <[email protected]>
language-ziran
Ziran (.zi) syntax highlighting for the Atom
editor, ported from the ziran-vscode
extension (version 0.6.3).
grammars/ziran.jsonis the extension'ssyntaxes/ziran.tmLanguage.jsonwith Atom'sfileTypesadded. The scope name is the same,source.ziran, so any syntax theme colours it the way it colours VS Code's tokens: directives (#import,#foreign, ...), line and block comments, strings, declarations (Name :: (...)as functions,Name :: valueas constants), scalar types,struct/enum, capitalised type names, numbers, keywords and operators.settings/language-ziran.csoncarries the editor rules fromlanguage-configuration.json://line comments (Ctrl+/) and brace-based auto-indent. Bracket and quote auto-closing is Atom's defaultbracket-matcherbehaviour.
The extension's other features (ziran check diagnostics, the Run pane, the
.zir viewer, Kryon preview) are VS Code extension code and are not part of
this package.
Install
Clone this repository into Atom's packages folder, then reload Atom (Ctrl+Shift+F5) or restart it:
git clone https://github.com/ziranlang/ziran-atom ~/.atom/packages/language-ziran
On Windows the packages folder is %USERPROFILE%\.atom\packages. .zi files
then open with the Ziran grammar; it is also selectable from the grammar
picker (Ctrl+Shift+L) as "Ziran".
Keeping the grammar in sync
When ziran-vscode changes syntaxes/ziran.tmLanguage.json, copy it over
grammars/ziran.json and re-add the "fileTypes": ["zi"] entry. The upstream
grammar tests (tests/grammar.test.mjs in ziran-vscode, run with
vscode-textmate and vscode-oniguruma) pass unchanged against this copy;
Atom's TextMate engine uses the same Oniguruma regex library.
License
MIT, like ziran-vscode. See LICENSE.