-
-
Notifications
You must be signed in to change notification settings - Fork 204
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
Support autocompleted or aliased imports #105
Comments
Lastest version of svelte beta support component auto import and import completion. But rename files and symbols still need some works. |
Great to hear! Thanks.
Should we close this or rename it to hone focus in on that feature? |
I would prefer to close this one and open one feature request for rename symbols and one for file renames/moves (I think these two are very different things to implement). |
Is your feature request related to a problem? Please describe.
When adding or refactoring routed .svelte files in Sapper, it is quite tedious to use the correct import path for components. Is it "../components/View.svelte" or "../../components/View.svelte", etc...
Describe the solution you'd like
Auto component import: when I start typing
<View
into a .svelte file, I would like a tooltip offering to import matching component(s).Additionally, when refactoring, I would like the editor to ask if I would like to update import paths as it does with Angular, for example.
Describe alternatives you've considered
An alternative would be to support the use of rollup-plugin-alias as seen in https://github.com/sveltecasts/010-rollup-alias/blob/master/rollup.config.js#L18 so that we can simply type
import View from "@components/View.svelte";
Note that I'm using a simpler implementation of rollup-plugin-alias:
And it would be even more awesome if BOTH could be supported. Thanks for the great work!
The text was updated successfully, but these errors were encountered: