An Emacs tree-sitter major mode for .svelte
files.
It requires
Emacs (>= emacs-major-version 29)
with tree-sitter support.
Svelte language grammer M-x treesit-install-language-grammar
You can use https://github.com/Himujjal/tree-sitter-svelte
It combines the following major modes:
[!CAUTION] Still in early development.
Not ready yet.
Manually
git clone https://github.com/leafOfTree/svelte-ts-mode --depth 1
; ~/.emacs
(add-to-list 'load-path "/path/to/svelte-ts-mode")
(require 'svelte-ts-mode)
For Spacemacs, put them inside dotspacemacs/user-config
.
; ~/.spacemacs
(defun dotspacemacs/user-config ()
(add-to-list 'load-path "/path/to/svelte-ts-mode")
(require 'svelte-ts-mode)
Inspired by https://github.com/mickeynp/html-ts-mode