Skip to content
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

Volar imports component as MyComponentVue instead of MyComponent #2511

Closed
ghost opened this issue Mar 15, 2023 · 1 comment
Closed

Volar imports component as MyComponentVue instead of MyComponent #2511

ghost opened this issue Mar 15, 2023 · 1 comment
Labels
bug Something isn't working good reproduction ✨ This issue provides a good reproduction, we will be able to investigate it first

Comments

@ghost
Copy link

ghost commented Mar 15, 2023

Requirements:

  • VS Code
  • Volar plugin
  • Vue 3 app

Reproduction steps:

  1. Create a new component, in my case I create MyIcon.vue with the content: <template>[any svg code here]</template>
  2. In any another component start typing "MyIc.." to add MyIcon.vue component inside template.

Actual state:
Autocomplete suggests to import MyIconVue instead of MyIcon. If you accept the suggestion, then import will look like import type MyIconVue from [path here].

Expected state:
Autocomplete suggests to import MyIcon and import looks like import MyIcon from [path here].

There is a screenshot of the issue: https://imgur.com/a/fu5jYOV

@johnsoncodehk johnsoncodehk added bug Something isn't working good reproduction ✨ This issue provides a good reproduction, we will be able to investigate it first labels Mar 29, 2023
@DanielViberg
Copy link

I observe a similar issue, maybe related to this.
I'm using vim and https://github.com/mattn/vim-lsp-settings. The issue is that when accepting the Component it is not added to the import section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good reproduction ✨ This issue provides a good reproduction, we will be able to investigate it first
Projects
None yet
Development

No branches or pull requests

2 participants