Skip to content

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

Closed

Description

@DanTup

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.

Activity

  1. added
    is enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.
    in commandsRelates to commands (usually invoked from the command Palette)
    on Apr 27, 2021
  2. added this to the On Deck milestone on Apr 27, 2021
  3. tjx666 commented on Apr 27, 2021

    @tjx666

    It would be better to override pubspec-assist features.

  4. DanTup commented on Apr 27, 2021

    @DanTup
    MemberAuthor

    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.

  5. modified the milestones: On Deck, v3.24.0 on May 24, 2021
  6. modified the milestones: v3.24.0, On Deck on Jun 21, 2021
  7. modified the milestones: On Deck, v3.25.0 on Jun 28, 2021
  8. changed the title [-]Add a command to "add package" that alls "pub add"[/-] [+]Add a command to "add package" that calls "pub add"[/+] on Nov 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    in commandsRelates to commands (usually invoked from the command Palette)is enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions