Skip to content

No suggestions for Components Props #4059

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mhzsam opened this issue Mar 9, 2024 · 19 comments
Closed

No suggestions for Components Props #4059

mhzsam opened this issue Mar 9, 2024 · 19 comments

Comments

@mhzsam
Copy link

mhzsam commented Mar 9, 2024

hi
one important problem is when i migrate from Volar & Vetur to this i did not seen any suggestions for Components props

@anegelya
Copy link

Same here. Downgraded to v1.8.27

@mhzsam
Copy link
Author

mhzsam commented Mar 10, 2024

thank you very much. the problem solved - why new version does not have this feature??

@mhzsam mhzsam closed this as completed Mar 10, 2024
@so1ve so1ve reopened this Mar 11, 2024
@lovesnsfi
Copy link

I have the same problem, how can I solve it?

@so1ve so1ve added the bug Something isn't working label Mar 11, 2024
@so1ve
Copy link
Member

so1ve commented Mar 11, 2024

@mhzsam This is a bug. So I reopened this issue.

@mhzsam
Copy link
Author

mhzsam commented Mar 11, 2024

I have the same problem, how can I solve it?

I downgrade to v1.8.27 and all things its OK

@hansonfang
Copy link

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:
image

@so1ve
Copy link
Member

so1ve commented Mar 13, 2024

didn't give any error

Remove vue-shim.d.ts

@so1ve
Copy link
Member

so1ve commented Mar 15, 2024

Let's track at #4074 since it is more detailed.

@so1ve so1ve closed this as completed Mar 15, 2024
@so1ve so1ve reopened this Mar 15, 2024
@so1ve
Copy link
Member

so1ve commented Mar 15, 2024

Ugh they are not the same :(

@sandros94
Copy link

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

@sandros94
Copy link

With 2.0.10 locally defined components do seem to be correctly resolved, while dep ones still aren't.

@manchenkoff
Copy link

manchenkoff commented Apr 15, 2024

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

@UfukUstali
Copy link

UfukUstali commented Apr 27, 2024

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

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.

@manchenkoff
Copy link

Yep, with 2.0.14 it seems fixed

@sandros94
Copy link

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

@kingyue737
Copy link
Contributor

kingyue737 commented May 14, 2024

Not fully fixed. Directly typing ctrl-space will give suggestions, but if I type some characters, the extension fail to give any suggestion.

image

image

@sandros94
Copy link

@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)

@kingyue737
Copy link
Contributor

kingyue737 commented May 14, 2024

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":

  1. Wait for suggestions (Work):
    bug1

  2. Trigger suggestions manually (Not work):
    bug2

I will investigate whether it is related to extension conflict or the mode of Vue - Official

@davidmatter
Copy link
Collaborator

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!

@davidmatter davidmatter added need info and removed bug Something isn't working labels Aug 7, 2024
@kermanx kermanx closed this as completed Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests