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

[Feature Request] Auto Imports along with Snippets #17

Open
matthew-nm opened this issue Apr 13, 2020 · 1 comment
Open

[Feature Request] Auto Imports along with Snippets #17

matthew-nm opened this issue Apr 13, 2020 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@matthew-nm
Copy link

First, thanks for creating these snippets. Being able to leverage modern conveniences like this makes using vim (neovim, in my case) extremely feasible, which is great because it's my favorite coding editor.

The context for this request is the following: When using coc.nvim, the standard completion suggestion for something like StatelessWidget includes the automatic import '...' line at the top of the file, if it doesn't exist. This is not only helpful so I don't have to remember where the import comes from and type it out myself, but it also prevents a lot of errors from appearing since the system won't be confused as to where from StatelessWidget comes.

When using awesome-flutter-snippets however, the automatic import is not done, which throws a lot of errors until I go add it in.

This is not a big deal, and I can imagine that it could be hard for a snippets engine to know if the import is already done or not, but I wanted to mention that it would be nice to have a single completion take care of the snippet as well as any necessary imports.

But I'm not sure where the functionality lies between coc.nvim and these snippets, so I don't know what the feasibility is of having something like this work.

Thanks for reading!

@matthew-nm matthew-nm changed the title [Feature Request] Auto Imports [Feature Request] Auto Imports along with Snippets Apr 13, 2020
@Nash0x7E2 Nash0x7E2 added the enhancement New feature or request label Apr 17, 2020
@Nash0x7E2
Copy link
Owner

Hi @matthew-nm!
Thank you for the request. This would be something very cool to add.

I am not familiar with the way in which imports are handled by vscode so it is something I will look into.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants