fix(emacs): add typst-ts-mode
This commit is contained in:
parent
cb5f196588
commit
7091b7ef29
1 changed files with 11 additions and 3 deletions
|
@ -132,13 +132,13 @@
|
||||||
(html . ("https://github.com/tree-sitter/tree-sitter-html" "v0.23.2"))
|
(html . ("https://github.com/tree-sitter/tree-sitter-html" "v0.23.2"))
|
||||||
(javascript . ("https://github.com/tree-sitter/tree-sitter-javascript" "v0.23.1" "src"))
|
(javascript . ("https://github.com/tree-sitter/tree-sitter-javascript" "v0.23.1" "src"))
|
||||||
(tsx . ("https://github.com/tree-sitter/tree-sitter-typescript" "v0.23.2" "tsx/src"))
|
(tsx . ("https://github.com/tree-sitter/tree-sitter-typescript" "v0.23.2" "tsx/src"))
|
||||||
(typescript . ("https://github.com/tree-sitter/tree-sitter-typescript" "v0.23.2" "typescript/src"))))
|
(typescript . ("https://github.com/tree-sitter/tree-sitter-typescript" "v0.23.2" "typescript/src"))
|
||||||
|
(typst "https://github.com/uben0/tree-sitter-typst")))
|
||||||
(add-to-list 'treesit-language-source-alist grammar)
|
(add-to-list 'treesit-language-source-alist grammar)
|
||||||
(unless (treesit-language-available-p (car grammar))
|
(unless (treesit-language-available-p (car grammar))
|
||||||
(treesit-install-language-grammar (car grammar)))))
|
(treesit-install-language-grammar (car grammar)))))
|
||||||
(dolist (mapping
|
(dolist (mapping
|
||||||
'(
|
'((css-mode . css-ts-mode)
|
||||||
(css-mode . css-ts-mode)
|
|
||||||
(typescript-mode . typescript-ts-mode)
|
(typescript-mode . typescript-ts-mode)
|
||||||
(js-mode . typescript-ts-mode)
|
(js-mode . typescript-ts-mode)
|
||||||
(js2-mode . typescript-ts-mode)
|
(js2-mode . typescript-ts-mode)
|
||||||
|
@ -149,6 +149,14 @@
|
||||||
:config
|
:config
|
||||||
(os/setup-install-grammars))
|
(os/setup-install-grammars))
|
||||||
|
|
||||||
|
(use-package typst-ts-mode
|
||||||
|
:straight '(:type git :host sourcehut :repo "meow_king/typst-ts-mode" :files (:defaults "*.el"))
|
||||||
|
:custom
|
||||||
|
(typst-ts-mode-watch-options "--open")
|
||||||
|
|
||||||
|
(typst-ts-mode-enable-raw-blocks-highlight t)
|
||||||
|
(typst-ts-mode-highlight-raw-blocks-at-startup t))
|
||||||
|
|
||||||
|
|
||||||
(provide 'priime-languages)
|
(provide 'priime-languages)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue