1.0.1 • Published 3 years ago
tree-sitter-noir v1.0.1
Tree-sitter Noir
Noir grammar and parser for tree-sitter
Emacs
- Make sure you have Emacs version 29.x and above.
- Add the grammar to your settings as so:
(add-to-list
'treesit-language-source-alist
'(noir "https://github.com/hhamud/tree-sitter-noir.git"))- Install the grammar
M-x treesit-install-language-grammar - Check if it has installed successfully
(treesit-language-available-p 'noir)- Download
noir-ts-mode.elfrom the GitHub repository.
- Move
noir-mode.elto a directory in your Emacs load path.
- Add the following code to your Emacs configuration file:
(require noir-ts-mode)Other
To install the grammar
npm i tree-sitter-noirUsage
Once noir-ts-mode.el is installed, it will automatically be enabled when you open a .nr file. The major mode will provide syntax highlighting for editing Noir code.
Examples
You can view a few examples of the syntax highlighting and of treesit-explore-mode using noir-ts-mode.el in images.
References
Contributing
Contributions to tree-sitter-noir are welcome. If you find any issues or have suggestions for improvement, please create a new issue or submit a pull request on the GitHub repository.