-
-
Notifications
You must be signed in to change notification settings - Fork 413
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
Feature request: auto importing components #194
Comments
I personally don't like this feature... It introduces some DX conventions outside TS. And it will increase many component item in completion list for a large project. As I know Vetur also has this feature, have you used one of them for a while? Does this feature bring substantial DX improvements?
Considering performance, we may only be able to handle auto-import from |
I wrote a project using PhpStorm and the main drawback of switching to VSCode was the loss of auto-importing components (and bad initial responsiveness). In fact some of our coworkers stay on Storm because of this. But I haven't used Vetur with this feature. |
Thanks for shared! "initial responsiveness" mean language server initialization speed, or first LSP request (like hover info) response speed? Will take a look for improve.
I don't think your coworkers will switch to VSCode when we add this feature. 🤣 Anyway I will try to implement this feature as experiment first. |
LSP requests can be quite long. I mean hover info, reference window and go to definitions (this ones can be reeeeeealy long). It really throttles if I make edits in multiple files at once (I mean > 10). This workflow happens very rarely tho. If you need any info from me, I will happily provide it! |
I want to improve it if possible, will be helpful if you can provide profiling. |
@sheremet-va Sorry for missing the message! You can open a new Issue / Discussion or ask on Discord anyway is ok. Please post how and where to get this error. |
Supported in |
PhpStorm has a nice feature of auto importing components when typing it's name inside
template
tag. Is it possible to add such functionality?Examples:
After picking:
Would be great if it also worked with script setup!
But I wonder how it will be handled with default typescript behavior? Because for example, if you store components inside folder like so:
and try importing component from
index
, will it handle it correctly? Because right now importingdefineComponent
imports it from@vue/runtime-core
and not fromvue
(which actually breaks our Vite application, but it's whole another story). I try not to open issues if Volar's behavior matches default.The text was updated successfully, but these errors were encountered: