use lua api for packersync wrapper
This commit is contained in:
parent
8db69224ba
commit
77a6c22fca
1 changed files with 8 additions and 1 deletions
|
@ -42,6 +42,13 @@ autocmd("FileType", {
|
|||
-- wrap the PackerSync command to warn people before using it in NvChadSnapshots
|
||||
autocmd("VimEnter", {
|
||||
callback = function()
|
||||
vim.cmd "command! -nargs=* -complete=customlist,v:lua.require'packer'.plugin_complete PackerSync lua require('plugins') require('core.utils').packer_sync(<f-args>)"
|
||||
vim.api.nvim_create_user_command("PackerSync", function(opts)
|
||||
require "plugins"
|
||||
require("core.utils").packer_sync(opts.fargs)
|
||||
end, {
|
||||
bang = true,
|
||||
nargs = "*",
|
||||
complete = require("packer").plugin_complete,
|
||||
})
|
||||
end,
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue