Skip to content

Commit

Permalink
Lsp volar activate (#3962)
Browse files Browse the repository at this point in the history
* Enable Volar to start when no workspace root exists yet

* Re-indent lsp-volar--activate-p
  • Loading branch information
boskamp authored Oct 27, 2023
1 parent 6bfb440 commit 7d5db4f
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions clients/lsp-volar.el
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,14 @@ in the WORKSPACE-ROOT."
(defun lsp-volar--activate-p (filename &optional _)
"Check if the volar-language-server should be enabled base on FILENAME."
(if lsp-volar-take-over-mode
(and (or
(and (lsp-workspace-root) (lsp-volar--vue-project-p (lsp-workspace-root)))
(and (lsp-workspace-root) lsp-volar-activate-file (f-file-p (f-join (lsp-workspace-root) lsp-volar-activate-file))))
(or (or (string-match-p "\\.mjs\\|\\.[jt]sx?\\'" filename)
(and (derived-mode-p 'js-mode 'typescript-mode 'typescript-ts-mode)
(not (derived-mode-p 'json-mode))))
(string= (file-name-extension filename) "vue")))
(string= (file-name-extension filename) "vue")))
(or (or
(and (lsp-workspace-root) (lsp-volar--vue-project-p (lsp-workspace-root)))
(and (lsp-workspace-root) lsp-volar-activate-file (f-file-p (f-join (lsp-workspace-root) lsp-volar-activate-file))))
(or (or (string-match-p "\\.mjs\\|\\.[jt]sx?\\'" filename)
(and (derived-mode-p 'js-mode 'typescript-mode 'typescript-ts-mode)
(not (derived-mode-p 'json-mode))))
(string= (file-name-extension filename) "vue")))
(string= (file-name-extension filename) "vue")))

(lsp-register-client
(make-lsp-client
Expand Down

0 comments on commit 7d5db4f

Please sign in to comment.