Skip to content

Commit

Permalink
lsp-volar: add hybridMode (#4426)
Browse files Browse the repository at this point in the history
  • Loading branch information
sdvcrx committed Apr 16, 2024
1 parent 6ec1bc5 commit 4a0aec0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions clients/lsp-volar.el
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@
:group 'lsp-volar
:package-version '(lsp-mode . "9.0.0"))

(defcustom lsp-volar-hybrid-mode nil
"Enable Hybrid Mode."
:type 'boolean
:group 'lsp-volar
:package-version '(lsp-mode . "9.0.1"))

(defcustom lsp-volar-activate-file ".volarrc"
"A file with a custom name placed in WORKSPACE-ROOT is used to force enable
volar when there is no package.json in the WORKSPACE-ROOT."
Expand Down Expand Up @@ -86,6 +92,9 @@
(lsp-volar-get-typescript-tsdk-path)))
t)))

(lsp-register-custom-settings
'(("vue.hybridMode" lsp-volar-hybrid-mode t)))

(defun lsp-volar--vue-project-p (workspace-root)
"Check if the `Vue' package is present in the package.json file
in the WORKSPACE-ROOT."
Expand Down Expand Up @@ -118,6 +127,7 @@ in the WORKSPACE-ROOT."
:multi-root nil
:server-id 'vue-semantic-server
:initialization-options (lambda () (ht-merge (lsp-configuration-section "typescript")
(lsp-configuration-section "vue")
(ht ("serverMode" 0)
("diagnosticModel" 1)
("textDocumentSync" 2))))
Expand Down

0 comments on commit 4a0aec0

Please sign in to comment.