From bacbd9b58d436a00cd5736e48412f59947621bd4 Mon Sep 17 00:00:00 2001 From: Jessie Hildebrandt Date: Fri, 14 Mar 2025 00:56:37 -0400 Subject: [PATCH] Add svelte-mode --- init.el | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/init.el b/init.el index a440a3f..717c827 100644 --- a/init.el +++ b/init.el @@ -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