Me and Alessandro Schena have made a tree-sitter parser for Eiffel.
We use it for syntax highlighting, code indentation and for semantic navigation and selection in Emacs and Neovim in rare occasions when only small edits to files are needed.
Tree-sitter grammars are supported by many editors among which are VSCode, Zed and Helix.
Neovim integration is pretty straightforward:
- Download repository
- Run
tree-sitter generatelocal parser_config = require 'nvim-treesitter.parsers'.get_parser_configs()
parser_config.eiffel = {
install_info = {
url = "<path-to-local-tree-sitter-eiffel-grammar>",
files = { 'src/parser.c' },
branch = 'main',
},
filetype = 'e'
}
- Start nvim and run :TSInstall eiffel.
Emacs integration is a bit more complicated. I will share what I have a bit later.