1

Add svelte-mode

This commit is contained in:
Jessie Hildebrandt 2025-03-14 00:56:37 -04:00
parent 855b1cf24d
commit bacbd9b58d

26
init.el
View File

@ -450,14 +450,16 @@ DOCSTRING is an optional form that is discarded upon expansion."
eglot-hover-eldoc-function))
(eglot-inlay-hints-mode -1))
:config
(add-to-list 'eglot-server-programs `(svelte-mode . ("svelteserver" "--stdio")))
;; Remove the mode-line segment that Eglot adds
(setq mode-line-misc-info (assoc-delete-all 'eglot--managed-mode mode-line-misc-info))
:hook
(c-ts-base-mode-hook . eglot-ensure)
(gdscript-mode-hook . eglot-ensure)
(js-ts-mode-hook . eglot-ensure)
(rust-ts-mode-hook . eglot-ensure)
(svelte-mode-hook . eglot-ensure)
(typescript-mode-hook . eglot-ensure)
(gdscript-mode-hook . eglot-ensure)
(eglot-managed-mode-hook . user/set-up-eglot)
:bind
(:map eglot-mode-map
@ -986,16 +988,22 @@ DOCSTRING is an optional form that is discarded upon expansion."
(external-package markdown-mode
"Major mode for Markdown files."
:mode
(("\\.md\\'" . markdown-mode)))
("\\.md\\'" . markdown-mode))
(external-package web-mode
"Major mode for web templates."
:custom
(web-mode-markup-indent-offset 2 "Use 2 spaces instead of 4 for indenting HTML elements")
(web-mode-enable-auto-quoting nil "Do not automatically insert quotes after HTML attributes")
(external-package svelte-mode
"Major mode for Svelte files."
:mode
(("\\.php\\'" . web-mode)
("\\.html\\'" . web-mode)))
("\\.svelte\\'" . svelte-mode))
;; (external-package web-mode
;; "Major mode for web templates."
;; :custom
;; (web-mode-markup-indent-offset 2 "Use 2 spaces instead of 4 for indenting HTML elements")
;; (web-mode-enable-auto-quoting nil "Do not automatically insert quotes after HTML attributes")
;; :mode
;; ("\\.php\\'" . web-mode)
;; ("\\.html\\'" . web-mode)
;; ("\\.svelte\\'" . web-mode))
;; ---------------------------------- ;;
;; anzu