nvim icon indicating copy to clipboard operation
nvim copied to clipboard

vue-language-server

Open drewbeno1 opened this issue 1 year ago • 3 comments

Did you hit the problem with the vue-language-server and the fileWatcher causing it not to attach? I can't find any good info online ! Thanks !

drewbeno1 avatar Aug 22 '24 02:08 drewbeno1

No, I haven't had that issue, but I also haven't done any vue development in a month or so. I can check tomorrow.

What error are you getting exactly?

catgoose avatar Aug 22 '24 02:08 catgoose

Looks like its an incompatibility problem. Check out this thread.

When you open up a vue file, the Volar LSP won't attach and it throws a long error, but here's the gist of it: [ERROR][2024-08-22 09:31:24] ... fileWatcher = server.watchFiles(['**/*.{' + [...watchingExtensions].join(',') + '}']); \n^\n\n TypeError: server.watchFiles is not a function\n at updateFileWatcher

No worries if you haven't seen it. I just figured i'd ask around to other vue & neovim users. Thanks!

drewbeno1 avatar Aug 22 '24 13:08 drewbeno1

image

I don't seem to have an issue using these versions installed locally to the project:

{
  "@vue/language-server": "^2.0.29",
  "typescript": "~5.5.4"
}

I have found the only way to get volar/typescript working the way I want it is to set the tdsk in lspconfig: https://github.com/catgoose/nvim/blob/main/lua/plugins/lspconfig.lua#L253-L271

catgoose avatar Aug 22 '24 14:08 catgoose

Yeah i have tsdk set for me as well. Looks like i have same vls version but an older typescript. I updated it to 5.5.4 and still same problem for me. IDK man, thanks for trying to help!

drewbeno1 avatar Aug 22 '24 15:08 drewbeno1

I was able to get it working by updateing my volar dependencies. Thanks for responding man, love your setup!

drewbeno1 avatar Aug 22 '24 16:08 drewbeno1