Tree-sitter major mode and LSP integration for Ember Glint (.gts / .gjs) files in Emacs.
This package provides:
glint-ts-mode— Tree-sitter major mode derived fromtsx-ts-modelsp-glint—lsp-modeclient forglint-language-server
Designed for Emacs 30+ only.
- Emacs 30.1+
- Node.js
glint-language-serverlsp-mode9.0+
M-x package-install RET glint-ts-mode(use-package glint-ts-mode
:ensure t)Opening a .gts or .gjs file will activate the mode and start LSP automatically.
Open a .gts or .gjs file.
glint-ts-modeis enabled automaticallyglint-language-serverstarts vialsp-mode- TypeScript LSP (ts-ls) is disabled for Glint buffers
This package relies on native Tree-sitter support in Emacs 30.
Install required grammars:
M-x treesit-install-language-grammar RET tsx
M-x treesit-install-language-grammar RET typescriptThis step is only if you need highlighting for GLimmer templates.
M-x treesit-install-language-grammar RET glimmerTo make these grammars available:
(setq treesit-language-source-alist
'((tsx "https://github.com/tree-sitter/tree-sitter-typescript" "master" "tsx/src")
(typescript "https://github.com/tree-sitter/tree-sitter-typescript" "master" "typescript/src")
(glimmer "https://github.com/alexlafroscia/tree-sitter-glimmer")))More information: https://www.gnu.org/software/emacs/manual/html_node/elisp/Parsing-Program-Source.html
(setq lsp-node-args '("--max-old-space-size=4096"))- glint-ts-mode derives from tsx-ts-mode
- Tree-sitter highlighting uses the TSX grammar
- Glint is treated as TypeScript at the LSP protocol level
- No legacy tree-sitter-mode support is included
MIT