diff --git a/home/config/doom/config.el b/home/config/doom/config.el index fc6ee7d..7941201 100644 --- a/home/config/doom/config.el +++ b/home/config/doom/config.el @@ -279,6 +279,13 @@ (append '(("\\.astro\\'" . astro-mode)) auto-mode-alist)) +(with-eval-after-load 'lsp-mode + (add-to-list 'lsp-language-id-configuration '(astro-mode . "astro")) + (lsp-register-client + (make-lsp-client :new-connection (lsp-stdio-connection '("astro-ls")) + :activation-fn (lsp-activate-on "astro") + :server-id 'astro-ls))) + (use-package! lsp-tailwindcss :defer t :init diff --git a/home/config/doom/config.org b/home/config/doom/config.org index 15fb41d..82416a3 100644 --- a/home/config/doom/config.org +++ b/home/config/doom/config.org @@ -627,6 +627,18 @@ Define Astro as a derived mode for ~.astro~ files. auto-mode-alist)) #+end_src +Register the astro-ls binary for lsp support. + +#+begin_src elisp +(with-eval-after-load 'lsp-mode + (add-to-list 'lsp-language-id-configuration '(astro-mode . "astro")) + (lsp-register-client + (make-lsp-client :new-connection (lsp-stdio-connection '("astro-ls")) + :activation-fn (lsp-activate-on "astro") + :server-id 'astro-ls))) +#+end_src + + **** Tailwind Add the tailwind lsp package #+begin_src elisp :tangle packages.el