mirror of
https://github.com/doomemacs/doomemacs.git
synced 2025-12-06 02:30:33 -08:00
feat(web): add treesit support (for html/css)
This commit is contained in:
parent
6b203d74c9
commit
5bf132a80f
2 changed files with 22 additions and 6 deletions
|
|
@ -73,5 +73,10 @@ If set to `nil', disable all the above behaviors.")
|
||||||
less-css-mode-local-vars-hook)
|
less-css-mode-local-vars-hook)
|
||||||
:append #'lsp!))
|
:append #'lsp!))
|
||||||
|
|
||||||
(when (modulep! +tree-sitter)
|
|
||||||
(add-hook 'css-mode-local-vars-hook #'tree-sitter! 'append))
|
(use-package! css-ts-mode
|
||||||
|
:when (modulep! +tree-sitter)
|
||||||
|
:when (fboundp 'css-ts-mode) ; 29.1+ only
|
||||||
|
:defer t
|
||||||
|
:init
|
||||||
|
(set-tree-sitter! 'css-mode 'css-ts-mode 'css))
|
||||||
|
|
|
||||||
|
|
@ -167,7 +167,18 @@
|
||||||
nxml-mode-local-vars-hook)
|
nxml-mode-local-vars-hook)
|
||||||
:append #'lsp!))
|
:append #'lsp!))
|
||||||
|
|
||||||
(when (modulep! +tree-sitter)
|
|
||||||
(add-hook! '(html-mode-local-vars-hook
|
(use-package! html-ts-mode
|
||||||
mhtml-mode-local-vars-hook)
|
:when (modulep! +tree-sitter)
|
||||||
:append #'tree-sitter!))
|
:when (fboundp 'html-ts-mode) ; 30.1+ only
|
||||||
|
:defer t
|
||||||
|
:init
|
||||||
|
(set-tree-sitter! 'html-mode 'html-ts-mode 'html))
|
||||||
|
|
||||||
|
|
||||||
|
(use-package! mhtml-ts-mode
|
||||||
|
:when (modulep! +tree-sitter)
|
||||||
|
:when (fboundp 'mhtml-ts-mode) ; 31+ only
|
||||||
|
:defer t
|
||||||
|
:init
|
||||||
|
(set-tree-sitter! 'mhtml-mode 'mhtml-ts-mode 'html))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue