From 7d5db4f54bf2107585c145f5e7f163ead7228357 Mon Sep 17 00:00:00 2001 From: boskamp Date: Fri, 27 Oct 2023 07:53:52 +0200 Subject: [PATCH] Lsp volar activate (#3962) * Enable Volar to start when no workspace root exists yet * Re-indent lsp-volar--activate-p --- clients/lsp-volar.el | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/clients/lsp-volar.el b/clients/lsp-volar.el index ba297a800ab..f06a892d1a8 100644 --- a/clients/lsp-volar.el +++ b/clients/lsp-volar.el @@ -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