vuejs / language-tools

⚡ High-performance Vue language tooling based-on Volar.js
https://marketplace.visualstudio.com/items?itemName=Vue.volar
MIT License
5.58k stars 376 forks source link

VSCode extension loses all highlighting, auto imports, intellisense, etc. #4256

Open tsi-trmorris opened 2 months ago

tsi-trmorris commented 2 months ago

I seem to have lost use of essentially all the functionality I care about in the VSCode extension. I have no highlighting, auto-imported components, etc. As a minimal reproduction, I created a new Vuetify project using their generator. For this, I ran pnpm create vuetify with the default options and pnpm as my package manager

image

Running the Vue: Restart Vue and TS servers command in my command palette reports the following in the Output tab:

[Error - 2:19:40 PM] Server process exited with code 0.
[Vue Named Pipe Client] No server found for c:/temp/vue/vuetify-project/src/App.vue

Environment: Version: 1.88.1 (user setup) Commit: e170252f762678dec6ca2cc69aba1570769a5d39 Date: 2024-04-10T17:41:02.734Z Electron: 28.2.8 ElectronBuildId: 27744544 Chromium: 120.0.6099.291 Node.js: 18.18.2 V8: 12.0.267.19-electron.0 OS: Windows_NT x64 10.0.22621

Ludidi commented 2 months ago

Me too And the file cannot be saved :(

Zhao-changyuan commented 2 months ago

Me too And the file cannot be saved :( Me too

saronwei commented 2 months ago

Me too And the file cannot be saved :(

s3xysteak commented 2 months ago

Me too in v2.0.12 😭

biwchi commented 2 months ago

Same problem in sublime text. No syntax highlighting and cannot be saved

Ludidi commented 2 months ago

Try to roll back to version v1.8.27. If there is unocss plug-in, it will be disabled. It is running normally now.

cdenadai commented 2 months ago

Hey guys, my problem was on vscode 1.88. Both Microsoft VSCode and VSCodium.

The solution for me was rollback the VSCodium version to 1.87, Microsoft VSCode don't let me rollback the version on ubuntu.

Let me know if it works.

wmurphyrd commented 2 months ago

Our team resolved this by rolling back Vue plugin - official to v2.0.6

astamant commented 2 months ago

Our team resolved this by rolling back Vue plugin - official to v2.0.6

This issue has been very disruptive, rolling back Vue - Official plugin to v2.0.6 as per @wmurphyrd fixed it for me as well.

FWIW, "Vue Language Server" output looks like this for me:

[Vue Named Pipe Client] No server found for c:/Users/astamant/Source/Repos/project/project-vue/src/modules/Customer/CustomerHome.vue
marlemie commented 2 months ago

Using VS Code, I have the same issue but do not even get any output from "Vue Language Server". Rolling back to 2.0.6 works.

TheVaan commented 2 months ago

I'm getting [Vue Named Pipe Client] No server found for ..... and [Vue Named Pipe Client] Timeout. Rollback to 2.0.6 is not working for me.

Vue plugin 2.0.14 vue-tsc 2.0.14

Edit: fixed it by deleting all node_modules folders (mono repo), package-lock.json and run npm install...

wunderdaz commented 2 months ago

Just found this my side, easily reproducable by creating a new Vuetify project, opening VSCode into the solution, then hovering over any vuetify control

@wmurphyrd How'd you roll back? My VSCode shows no previous versions

Edit: Here's a tutorial https://github.com/microsoft/vscode/issues/12764#issuecomment-442370545

code --install-extension Vue.volar@2.0.6

Double edit: Downgrading doesnt work image

rrobertobt commented 2 months ago

Just found this my side, easily reproducable by creating a new Vuetify project, opening VSCode into the solution, then hovering over any vuetify control

@wmurphyrd How'd you roll back? My VSCode shows no previous versions

Edit: Here's a tutorial microsoft/vscode#12764 (comment)

code --install-extension Vue.volar@2.0.6

Double edit: Downgrading doesnt work image

Can confirm this, I just created a new Vuetify project using Vuetify;s CLI and it's not working, but Nuxt projects do work without problems (imports, suggestions...)

wsndshx commented 1 month ago

Just found this my side, easily reproducable by creating a new Vuetify project, opening VSCode into the solution, then hovering over any vuetify control

@wmurphyrd How'd you roll back? My VSCode shows no previous versions

Edit: Here's a tutorial microsoft/vscode#12764 (comment)

code --install-extension Vue.volar@2.0.6

Double edit: Downgrading doesnt work image

The same situation, but when I rolled back to version v1.8.27, it seemed to get a little better.

image

Could identify functions that were not implemented. In v2.0.6, the extension did not remind that the function did not exist. But still cannot recognize vuetify controls:

image

------edit------

I've noticed this reply: https://github.com/vuejs/language-tools/issues/4421#issuecomment-2139294691

image

I made changes to the tsconfig.json file based on the content in this reply, and now everything is working fine.

image

And it also applies to the v2.0.19 extension.

so1ve commented 1 month ago

True, since we are using ts plugins in v2, you must explicitly include vue files in your tsconfig.

fdc-viktor-luft commented 2 weeks ago

I found that the plugin only started to work again when removing the **.vue files from the "include" section of the TS config. Resulting in other errors being reported by vue-tsc, but I haven't investigated these issues closely now. Seemed to be only related to usages of arrow functions in the template section where the types couldn't be correctly derived anymore.