Use web-mode for astro
This commit is contained in:
parent
73227abcbe
commit
6352fbb697
@ -1,14 +1,6 @@
|
||||
;; -*- lexical-binding: t; -*-
|
||||
|
||||
(use-package astro-ts-mode
|
||||
:mode "\\.astro\\'"
|
||||
:init
|
||||
(with-eval-after-load 'treesit
|
||||
(add-to-list 'treesit-language-source-alist
|
||||
'(astro "https://github.com/virchau13/tree-sitter-astro"))
|
||||
(add-to-list 'treesit-language-source-alist
|
||||
'(css "https://github.com/tree-sitter/tree-sitter-css"))
|
||||
(add-to-list 'treesit-language-source-alist
|
||||
'(tsx "https://github.com/tree-sitter/tree-sitter-typescript" "master" "tsx/src"))))
|
||||
(define-derived-mode astro-mode web-mode "astro")
|
||||
(add-to-list 'auto-mode-alist '("\\.astro\\'" . astro-mode))
|
||||
|
||||
(provide 'init-astro)
|
||||
|
@ -92,9 +92,9 @@
|
||||
|
||||
;; Astro
|
||||
(add-to-list 'eglot-server-programs
|
||||
'(astro-ts-mode . ("astro-ls" "--stdio"
|
||||
:initializationOptions
|
||||
(:typescript (:tsdk "./node_modules/typescript/lib")))))
|
||||
'(astro-mode . ("astro-ls" "--stdio"
|
||||
:initializationOptions
|
||||
(:typescript (:tsdk "./node_modules/typescript/lib")))))
|
||||
|
||||
;; Custom eglot java server for deeper customization
|
||||
(defvar eglot-java-java-agent nil
|
||||
@ -235,7 +235,7 @@
|
||||
(ruby-ts-mode . eglot-ensure)
|
||||
(sh-mode . eglot-ensure)
|
||||
(bash-ts-mode . eglot-ensure)
|
||||
(astro-ts-mode . eglot-ensure)
|
||||
(astro-mode . eglot-ensure)
|
||||
:custom
|
||||
(eglot-confirm-server-initiated-edits nil)
|
||||
(eglot-connect-timeout nil))
|
||||
|
Loading…
Reference in New Issue
Block a user