Skip to content

Commit

Permalink
fix(astro): astro lsp server 2.0+ uses tsdk option instead of serverP…
Browse files Browse the repository at this point in the history
…ath. (#4102)

Use tsdk option and set the typescript.tsdk path

Co-authored-by: Tianyi Wang <[email protected]>
  • Loading branch information
tian-yi and Tianyi Wang authored Jul 17, 2023
1 parent 5550e12 commit d3a63b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clients/lsp-astro.el
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@

(defun lsp-astro--get-initialization-options ()
"Try to get the typescript server path, to supply to the astro language server."
(let ((library (f-join (lsp-workspace-root) "node_modules/typescript/lib/tsserverlibrary.js")))
(let ((library (f-join (lsp-workspace-root) "node_modules/typescript/lib")))
(if (file-exists-p library)
`(:typescript (:serverPath ,library))
`(:typescript (:tsdk ,library))
(lsp-warn "Unable to find typescript server path for astro-ls. Guessed: %s" library))))

(defgroup lsp-astro nil
Expand Down

0 comments on commit d3a63b0

Please sign in to comment.