Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Setting up tree-sitter

The tree-sitter grammar gives editors highlighting, folding and indentation that understand M2’s actual syntax.

You may not need this at all:

  • VS Code: the extension gets highlighting from the language server, nothing to set up.
  • Any editor running m2-ls: semantic highlighting from the server already covers most of what tree-sitter would. Tree-sitter adds instant highlighting before the server starts, folding and indentation.
EditorGuide
NeovimNvim
EmacsEmacs
Helix, Zednot written up yet