Add svelte-mode

This commit is contained in:
Erwin Boskma 2024-06-24 14:26:34 +02:00
parent 7dee9b302e
commit b886319f51
Signed by: erwin
SSH key fingerprint: SHA256:OCinH/khuGY1LA9RG8YLM8GNH6C1DDXBdy3SNE+I5Hw

View file

@ -1107,6 +1107,7 @@ Prefer local packages from =node_modules= to global ones
#+begin_src emacs-lisp
(use-package web-mode
:mode "\\.svelte\\'"
:after eglot
:config
(setq web-mode-markup-indent-offset 2
@ -1119,7 +1120,8 @@ Prefer local packages from =node_modules= to global ones
(add-to-list 'web-mode-engines-alist '(("elixir" . "\\.html.heex\\'")
("jinja2" . "\\.jinja2\\'")
("python" . "\\.pt\\'")))
("python" . "\\.pt\\'")
("svelte" . "\\.svelte\\'")))
:hook
((html-mode css-mode web-mode) . eglot-ensure))
#+end_src
@ -1617,6 +1619,20 @@ Register =nushell= LSP with eglot
(use-package lua-mode)
#+end_src
*** Svelte
#+begin_src emacs-lisp
(use-package svelte-mode)
#+end_src
Use =svelteserver= as LSP
#+begin_src emacs-lisp
(with-eval-after-load 'eglot
(add-to-list 'eglot-server-programs
'(svelte-mode . ("svelteserver" "--stdio"))))
#+end_src
* Org
** Main org setup