Oat
Oat language syntax highlighting
How to install
With Forge Super installed, the button above opens the app on this extension, where you press Install. Nothing is installed until you do.
You can also open the Extensions panel in the app and search for Oat. The extension's id is oat.
Don't have Forge Super yet? Download it here.
README
From the extension's repository, written by its authors and not by Mentenaz. See the source.
zed-oat-extension
A Zed extension which adds syntax highlighting to the Oat language. The extension is powered by the tree-sitter-oat grammar.
Installation
Currently, the extension is not yet added to the official zed extension catalog. Therefore, the extension needs to be installed manually as a dev extension.
Setup
Out-of-the-box, the extension matches all .oat files. If you want to match more file types, you need to edit the file_types mapping in your settings.json file.
Development
To help developing this extension you need to install it as an dev extension. For this you'll have to have cargo installed and the wasm32-wasip2 target ond the stable rust toolchain set up. Additionally, you'll need to clone this repository to some location from where you can install it as a dev extension. A more detailed tutorial about this can be found in the Zed docs.
tree-sitter queries
All tree-sitter queries for the extension are stored as git diffs which can be patched into the tree-sitter grammar. This patching automatically happens during the build phase.
To create a new query diff which can be patched, you need to copy all .scm files from this repository into the tree-sitter-oat/queries/oat directory or patch the diffs directly onto it.
Then, new diffs can be generated using
# Create git diff for a new file
git diff /dev/null queries/oat/<path-to-query>.scm > output.diff
# Create git diff for a file which was modified
git diff queries/oat/<path-to-query>.scm > output.diff
and then copied into the patches folder of this repository.