Skip to content

Commit

Permalink
emacs: add astro lsp support
Browse files Browse the repository at this point in the history
  • Loading branch information
tiborpilz authored and Tibor Pilz committed Dec 12, 2023
1 parent 79c5d60 commit 91cfac1
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
7 changes: 7 additions & 0 deletions home/config/doom/config.el
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 12 additions & 0 deletions home/config/doom/config.org
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 91cfac1

Please sign in to comment.