1
0
Fork 0

fix(emacs): add typst-ts-mode

This commit is contained in:
Lucas Sta Maria 2025-02-15 01:14:39 -05:00
parent cb5f196588
commit 7091b7ef29
No known key found for this signature in database
GPG key ID: F07FB16A826E3B47

View file

@ -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)