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

Add a command to "add package" that calls "pub add" #3306

Closed
DanTup opened this issue Apr 27, 2021 · 2 comments · Fixed by #3474
Closed

Add a command to "add package" that calls "pub add" #3306

DanTup opened this issue Apr 27, 2021 · 2 comments · Fixed by #3474
Labels
in commands Relates to commands (usually invoked from the command Palette) is enhancement
Milestone

Comments

@DanTup
Copy link
Member

DanTup commented Apr 27, 2021

Pub has both a command for adding new packages, and an API to get all package names for completion. With these, we could add a command palette command to add packages that would avoid having to modify the pubspec directly.

In the past, some issues have been reported that turned out to be subtly-incorrect indentation in pubspec, so handing off the editing to Pub for simple tasks like this might save some of those.

@DanTup DanTup added is enhancement in commands Relates to commands (usually invoked from the command Palette) labels Apr 27, 2021
@DanTup DanTup added this to the On Deck milestone Apr 27, 2021
@tjx666
Copy link

tjx666 commented Apr 27, 2021

It would be better to override pubspec-assist features.

@DanTup
Copy link
Member Author

DanTup commented Apr 27, 2021

I'm not sure what you mean by "override". I don't think it makes sense to interfere with another extensions commands (especially when they're prefixed with the name of the extension). There may be some overlap with this, but it also supports things that might not be added here (for example multiple packages in one go, and sorting the file).

I hope for implementation here to show the list of packages, filtered as you type. It may also be possible to get the descriptions, although microsoft/vscode#75005 might interfere a little with that.

@DanTup DanTup modified the milestones: On Deck, v3.24.0 May 24, 2021
@DanTup DanTup modified the milestones: v3.24.0, On Deck Jun 21, 2021
@DanTup DanTup modified the milestones: On Deck, v3.25.0 Jun 28, 2021
@DanTup DanTup changed the title Add a command to "add package" that alls "pub add" Add a command to "add package" that calls "pub add" Nov 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in commands Relates to commands (usually invoked from the command Palette) is enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants