catgoose / nvim

Neovim config for Typescript Angular/Vue and Lua plugin development
132 stars 1 forks source link

vue-language-server #2

Closed drewbeno1 closed 2 months ago

drewbeno1 commented 2 months ago

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 !

catgoose commented 2 months ago

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?

drewbeno1 commented 2 months ago

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!

catgoose commented 2 months ago

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

drewbeno1 commented 2 months ago

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 commented 2 months ago

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