language-tools
language-tools copied to clipboard
No suggestions for Components Props
hi one important problem is when i migrate from Volar & Vetur to this i did not seen any suggestions for Components props
Same here. Downgraded to v1.8.27
thank you very much. the problem solved - why new version does not have this feature??
I have the same problem, how can I solve it?
@mhzsam This is a bug. So I reopened this issue.
I have the same problem, how can I solve it?
I downgrade to v1.8.27 and all things its OK
I've downgraded to 1.8.27 but still no intelliense for *.vue files, even I wrote the wrong import path intentionally it didn't give any error:
didn't give any error
Remove vue-shim.d.ts
Let's track at https://github.com/vuejs/language-tools/issues/4074 since it is more detailed.
Ugh they are not the same :(
Are there any logs that I could provide to be useful to debug this?
This issue has been affecting the DX of @nuxt/ui (issue #1501) since volar 2.0
With 2.0.10 locally defined components do seem to be correctly resolved, while dep ones still aren't.
I also noticed weird behavior, maybe it will help, for example, I use Nuxt UI, and in .nuxt/components.d.ts it resolves only client components:
// doesn't work
'UModal': typeof import("../node_modules/@nuxt/ui/dist/runtime/components/overlays/Modal.vue")['default']
// works fine
'UModals': typeof import("../node_modules/@nuxt/ui/dist/runtime/components/overlays/Modals.client.vue")['default']
Extension version - 2.0.10 Nuxt UI version - 2.15.2
I also noticed weird behavior, maybe it will help, for example, I use Nuxt UI, and in
.nuxt/components.d.tsit resolves onlyclientcomponents:// doesn't work 'UModal': typeof import("../node_modules/@nuxt/ui/dist/runtime/components/overlays/Modal.vue")['default'] // works fine 'UModals': typeof import("../node_modules/@nuxt/ui/dist/runtime/components/overlays/Modals.client.vue")['default']Extension version - 2.0.10 Nuxt UI version - 2.15.2
Form what I could figure out the reason Modals.client.vue works is because in the built source code it doesn't have an accompanying .vue.d.ts file.
I came to this conclusion because any component that when built is split into .vue and .vue.d.ts files seems to have their types broken while the ones that are split as .mjs and .d.ts files are still working.
Then I tried writing a component myself in application code both with MyComp.vue and MyComp.vue.d.ts, when I do that MyComp.vue file seems to take precedence, only when the MyComp.vue file is deleted does the type system fallback to the MyComp.vue.d.ts file and display the types correctly.
This still doesn't explain why the types would be any though when the component lives inside a package instead of application code or does this makes sense for some reason I'm not aware of.
Even though this doesn't definitively explain the stuation with UModals it does seem related. So I wanted to offer my two cents.
Edit: Nevermind the issue seems to be fixed in the 2.0.14 relase for those that did not found the version, due to a bug in VS Marketplace there are currently two Vue - Official extensions listed. by the time you are reading this it might be fixed.
Yep, with 2.0.14 it seems fixed
I only now had time to upgrade from 2.0.10 to 2.0.17 and can also confirm it seems to be fixed.
Tested with Nuxt:
- local components
- remote components (layers via path, git and npm)
- npm components
Not fully fixed. Directly typing ctrl-space will give suggestions, but if I type some characters, the extension fail to give any suggestion.
@kingyue737 I might be wrong, but it seems to me an extension conflict. Could you quickly test disabling all the extension but Vue - Official?
(I also imagine your ctrl+j being a custom binding)
My bad, not ctrl+j, it is ctrl+space which is the default keybinding for triggering suggestions on Windows. It does work currently but a little strange. I need to wait 1 ~ 2 seconds (which seems much slower than v1.8.27) before the extension gives suggestions automatically. If I press ctrl+space to manually trigger suggestions during this "1~2 seconds", it will show "no suggestions":
-
Wait for suggestions (Work):
-
Trigger suggestions manually (Not work):
I will investigate whether it is related to extension conflict or the mode of Vue - Official
Hey there, as there have been many fixes in the last 2.x versions: Please let us know if you're still encountering this issue. Otherwise kindly close this one, thanks!