Syntax highlighting and indentation still need a bit more testing and fine tuning, sometimes when writing some egregious Odin code Emacs will crash? lockup? but most of the time it should be fine.
A Major mode for Emacs >= 29.1 powered by tree-sitter for editing odin files.
Emacs >= 29.1 compiled with tree-sitter.
The grammar utilized for this major-mode can be found at https://github.com/tree-sitter-grammars/tree-sitter-odin.
To install it you can add this line to your `treesit-language-source-alist`:
(defvar treesit-language-source-alist
'(...
(odin "https://github.com/tree-sitter-grammars/tree-sitter-odin")
...))
Afterwards run M-x treesit-install-language-grammar RET odin RET.
Clone this repo
git clone https://github.com/Sampie159/odin-ts-mode.git
and add this to your init.el file:
(load-file "/path/to/odin-ts-mode.el")
You can also use use-package to install this package, simply add this to your init.el file:
(use-package odin-ts-mode
:ensure (:host github :repo "Sampie159/odin-ts-mode"))
- [-] Syntax Highlighting [1/2]
- [X] Get something working
- [ ] Make things prettier
- [X] Indentation [2/2]
- [X] Get something working
- [X] Make sure everything is good
- [X] Imenu