Open maxminoS opened 2 years ago
A simple workaround perhaps is creating a .volarrc
file at the project root:
https://emacs-lsp.github.io/lsp-mode/page/lsp-volar/#lsp-volar-activate-file
The same issue applies when vue is not present in the devDeps or deps, but instead as a subDep of a package like Nuxt.
Do we know if there is any reason to why it specifically looks for Vue in the package.json instead of taking a likeness to the lsp-vetur
detection?
Thank you for the bug report
lsp-mode
related packages.M-x lsp-start-plain
Bug description
The Volar language server for Vue does not open
.vue
files ifvue
is not listed independencies
inpackage.json
. It does not take into account that, while abnormal,vue
can also be listed indevDependencies
.Steps to reproduce
Open
.vue
file whenvue
is listed indevDependencies
Expected behavior
Volar language servers should start
Which Language Server did you use?
eslint
andvolar
(volar-html
,volar-api
,volar-doc
)OS
MacOS
Error callstack
No response
Anything else?
I have checked that this error occurs at the function
lsp-volar--vue-project-p
, with the help of @yyoncho . Possible solutions would be to either adddevDependencies
detection onto the function, check whether or not Vue exists innode_modules/
, use.vue
extension, or somehow leverage all of these methods to determine whether or not to start it.