This weekend I got interested in emacs major modes based on treesitter, so I decided to implement
ocaml-ts-mode. The code can be found here:
It was actually very easy thanks to the hard work others have done in creating the treesitter grammar.
- Syntax highlighting of
- Initial indentation support (this is probably currently broken in multiple places)
C-c C-a- Switch between
.mlifiles for a module.
This is less feature rich than Tuareg mode, so I don’t know if it replaces it. If anything, maybe it could be integrated into tuareg mode.
I have no experience writing elisp so this probably has obvious mistakes. Contributions welcome!