scala-ts-mode
is a tree-sitter based GNU Emacs major mode built on top of the Emacs 29+ treesit
library. It provides the following features in a Scala buffer-
- efficient font-locking using tree-sitter
imenu
integration- indentation support using tree-sitter
The major-mode is mostly complete and in a very usable state currently. Improvements will come as I find bugs, edge cases, more use cases or the upstream grammar evolves.
To use the package, the following dependencies are required.
- GNU Emacs 29+, built with support for tree-sitter.
- tree-sitter grammar for Scala (you can use the
treesit-install-language-grammar
function for installing it.)
To install the package, you can use any Emacs package manager of your choice, to pull the package either from MELPA or source. For example, with straight.el, you can do the following -
(straight-use-package 'scala-ts-mode)
(straight-use-package '(scala-ts-mode :type git :host github :repo "KaranAhlawat/scala-ts-mode"))
Then, you can simply call scala-ts-mode
in a Scala buffer.
Contributions are welcome! These can be in the form of PRs, Issues, or any other way you can think of. This is my first package, so please don’t hold back :)
GPLv3