wbthomason / packer.nvim

A use-package inspired plugin manager for Neovim. Uses native packages, supports Luarocks dependencies, written in Lua, allows for expressive config
MIT License
7.87k stars 267 forks source link

feat(packer): query what plugin to load if none if specified #1055

Open AckslD opened 2 years ago

AckslD commented 2 years ago

This allows PackerLoad to take no arguments and in that case query the user for the plugin to load using vim.ui.select.

To do this a bit more cleanly I changed the command to be created with the lua api instead of vim.cmd. Maybe all commands should be changed to that but I think that's anyway the plan for #1042.

Also, is packer.loader considered part of the public api? Since this version changes it's expected argument. Could keep the same behaviour of packer.loader though if needed and have another internal function which is called by PackerLoad.

AckslD commented 2 years ago

I guess we need to check if nvim_create_user_command actually exists, since 0.5 and 0.6 are still supported.