Syntax highlighting for Zig for Sublime Text editor. Use Package control to install this.
Sublime Text 3 and above uses the .sublime-syntax
file.
This is the one you should edit to improve Sublime Text support.
See official docs
This repository also contains a .tmLanguage
syntax for old versions of Sublime Text or TextMate.
This file is also used by Github's syntax highlighting:
Github Linguist.
Use Package control to install this.
The Zig.tmLanguage
is also compatible with TextMate.
To install in TextMate clone or download this repository.
Then rename the repository directory to Zig.tmBundle
and double-click it to install it into TextMate.
However, see Zig.tmbundle for dedicated TextMate support.
Clone or copy this repository to your local Sublime Text folder. e.g.
git clone https://github.com/ziglang/sublime-zig-language.git "/Users/$USER/Library/Application Support/Sublime Text 3/Packages/Zig Language"
For working on ST3+ support, you can edit the .sublime-syntax
directly.
But installing PackageDev
will provide some syntax highlighting.
You can run the tests in syntax_test.zig
with the "Syntax Tests" builtin build system.
Sublime Text will automatically reload the syntax on save.
If you have a big Zig project open this can make your CPU spin while Sublime reindex everything.
For working on the old .tmLanguage
syntax, work on the Zig.YAML-tmLanguage
file.
Important Github Linguist's source of truth is Zig.YAML-tmLanguage
.
Work on Zig.YAML-tmLanguage
the use PackageDev command: Convert (YAML, JSON, PList) to...
to generate the .tmLanguage
.
Sublime Text should also automatically reload the plugin, but doesn't have unit tests for tmLanguage
.
The included Sublime Text build system comes with a few options for configuration and defining your own build targets. See here for more information.
Provided under an MIT License