vuejs / language-tools

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

IntelliSense is not working #4338

Open DenisOstr opened 2 months ago

DenisOstr commented 2 months ago

IntelliSense doesn't work. Doesn't show what's in the component, nor does it suggest component names in autocomplete (Nuxt UI installed)

2024-05-03_135051223 2024-05-03_135612245 2024-05-03_135639474

What I've already tried (Did not help):

Possibly related things:

By TypeScript image

By Vue Language Server image

Extension: v2.0.16 VSCode: v1.89.0 OS: Windows 11 Framework: Nuxt 3

krxvv commented 2 months ago

Same here after the extension update I'm getting no linting at all, no suggestions/IntelliSense for autocomplete it doesn't recognize anything.

Is there any temporary workaround? maybe reinstalling previous version and prevent it from updating?

edarblanco commented 2 months ago

I have the same problem, just going back to version 2.0.14 solves it, version 2.0.15 is also compromised

DenisOstr commented 2 months ago

I tried all the versions that are available on the marketplace. Did not help.

krxvv commented 2 months ago

Yo this is so weird I want to say something but first, did you try using any VPN or proxy to another network? Like I mean to fix it. try and tell me.

Because I'm guessing something like all three of us who are talking about this here are from certain countries, using VPN worked for me the ts-plugin or the vue plugin loads the IntelliSense like insiders also wont be loaded if I don't use VPN

DenisOstr commented 2 months ago

This sounds very strange. How changing the network helps the extension, which in theory works offline. Actually, as expected, VPN didn’t help at all.

krxvv commented 2 months ago

Yeah you are right, I know this is nonsense, but for me choosing insider versions also wont work without changing my ip addr.

DenisOstr commented 2 months ago

Are you talking about the insider version of the extension or VSCode? I'm just not really sure what the problem is in the editor or in the extension

johnsoncodehk commented 2 months ago

Can you clone https://github.com/johnsoncodehk/volar-starter and reproduce the problem locally?

If yes, can you reproduce this problem for https://github.com/johnsoncodehk/volar-starter in GitHub Codespaces? If no, can you reproduce this problem for you project in GitHub Codespaces?

krxvv commented 2 months ago

@DenisOstr the insider version of this vue extension!

DenisOstr commented 2 months ago

Can you clone https://github.com/johnsoncodehk/volar-starter and reproduce the problem locally?

If yes, can you reproduce this problem for https://github.com/johnsoncodehk/volar-starter in GitHub Codespaces? If no, can you reproduce this problem for you project in GitHub Codespaces?

I'll try this

krxvv commented 2 months ago

Can you clone https://github.com/johnsoncodehk/volar-starter and reproduce the problem locally?

If yes, can you reproduce this problem for https://github.com/johnsoncodehk/volar-starter in GitHub Codespaces? If no, can you reproduce this problem for you project in GitHub Codespaces?

Sure, can't right now but I'll also try later

arielkern commented 2 months ago

Same issue here. Seems related to vscode april's update (v1.89.0). Downgrading vscode worked for me.

DenisOstr commented 2 months ago

Can you clone https://github.com/johnsoncodehk/volar-starter and reproduce the problem locally?

If yes, can you reproduce this problem for https://github.com/johnsoncodehk/volar-starter in GitHub Codespaces? If no, can you reproduce this problem for you project in GitHub Codespaces?

I tried and got the following result:

DenisOstr commented 2 months ago

Same issue here. Seems related to vscode april's update (v1.89.0). Downgrading vscode worked for me.

I tried, but I'll try again

DenisOstr commented 2 months ago

@arielkern Which version did you install? I tried 1.88.1 but that didn't work either

DenisOstr commented 2 months ago

I tried VSCode version 1.88.1, it didn't work. I tried VSCode version 1.87.2, it didn't work. I uninstalled VSCode and everything related with it, installed both versions, it didn’t work

UPD: It seems to have been fixed, but only when I start typing does autocomplete work. If I just press ctrl + space, nothing is offered, not even what is in the component.

VSCode Version: v1.87.2 Vue - Official version: v1.8.27

edarblanco commented 2 months ago

Update VSCode version 1.89.1, it didn't work. Vue - Official version: v2.0.16

But, VSCode version 1.89.1 and Vue - Official version: v2.0.14 work

DenisOstr commented 2 months ago

What exactly works and how?

For me, with versions 1.87.2 and 1.8.27 (VSCode and Vue - Official), only autocomplete worked, and sometimes it doesn’t find certain things. Intellisense also doesn't work for me (when I'm just trying to call something without starting to type. Press CTRL + Space)

On version 1.89.1 I tried all versions of Vue - Official, none worked

DenisOstr commented 2 months ago

I've checked it now. It seems like autocomplete works on versions 1.89.1 and 2.0.16, but Intellisense doesn’t show me anything

edarblanco commented 2 months ago

I can exactly use autocomplete and so on, without any other changes, but I use Archlinux, I don't know if this could influence image

edarblanco commented 2 months ago

Hello, a few minutes ago I updated to the latest version of Vue Official v2.0.17 with VS Code 1.89.1 and everything is fine.

bosens-China commented 2 months ago

Update to the latest version and set the tsconfig.json file to the following format

{
"CompilerOptions":{
"BaseUrl": "./",
"AllowJs": true,
"ResolveJsonModule": true,
//"Target": "ES2022",
"IsolatedModules": true,
"Strict": true,
"Paths":{
"~/*": [./*]
},
"OutDir": "./dist"
}
}

It seems that the target will cause an exception to occur

fullmooooon commented 1 month ago

delete Vscode plugin "vetur" use "Vue - official"

okmkey45 commented 1 month ago

Hello everybody. I was having the same issue and none of the versions worked for me, not even downgrading the extension to 1.8.27

I found that there's a new feature in version 2 called Hybrid mode. I found this issue and it's kind of similar (I might be wrong). So, what I did was setting this new setting to typeScriptPluginOnly. Probably this is not best fix but at least, it helped me to enable IntelliSense again. So, I hope it can help you guys while this is properly fixed

Screenshot from 2024-05-30 08-29-50

abubakriz commented 1 month ago

I am on VSCode version v1.89.1 and Volar version v2.0.19

It doesn't seem to be able to autocomplete even basic things like auto importing ref and other components.

I don't know how I can help beyond saying what's happening to me, is there a way to get a debug log and send it here or something that will help the developers find the source of the issue?

dalpii commented 1 month ago

I'm experiencing something related to this, and I would like to provide some findings in hope that makes sense to maintainers.

I'm using Vue.JS + TypeScript, with default configs (no change regarding Vue/Volar). I'm also using Codespaces for development, so that's why I get this behavior pretty often.

Upon creation of a new Codespaces machine, after everything is installed, if I try to open a Vue file it seems everything is working, hover/IntelliSense on HTML is working fine, but once I try hover on a TypeScript variable I get nothing, and of course, not completions, etc.

Please take notice on this VSCode status:

Captura de Tela 2024-06-04 às 10 26 38

I've enabled language server tracing, and once I hover a simple const I get this:

[Trace - 1:30:44 PM] Received response 'textDocument/hover - (22)' in 3ms.
No result returned.

I've noticed that restarting language server, or even just closing and reopening Codespaces didn't work either.

But what I found is that, once I restarted VSCode itself (quit and reopen the application), and load the same Codespaces, and open the same file, everything seems to magically works.

One thing I've noticed is that now I'm getting a new row with TS version on VSCode status:

Captura de Tela 2024-06-04 às 09 59 33

I hope someone can reproduce this even on local codebases, and we get to the bottom of what's going on. Maybe something related to Hybrid Mode?

ameryu716 commented 5 days ago

When will it be, this problem will resolved? This have always helped me, but as far as complementary functions are concerned, really, really, useless. ref,reactive,computed... various functions exist, but ,I haven't seen any of these codes auto import in the last two years. Until a few years ago, I was open to using the vetur extension as a transition period, but I think that time has passed. When will this extension work properly?