Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Packer v2 Rewrite#1042

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
wbthomason wants to merge25 commits intomaster
base:master
Choose a base branch
Loading
fromrefactor/packer-v2
Draft
Changes from1 commit
Commits
Show all changes
25 commits
Select commitHold shift + click to select a range
0bafe57
Add some initial TODOs
wbthomasonJun 13, 2021
8febf39
Put configuration into its own module
wbthomasonOct 30, 2021
35ac1b2
WIP main module rewrite
wbthomasonOct 30, 2021
f8bb182
Implement specification flattening
wbthomasonFeb 6, 2022
999d0b7
Add ensure_table function
wbthomasonNov 29, 2021
a83314b
WIP flattening iterator for plugin specs
wbthomasonNov 29, 2021
29cd719
Minor code cleanup, preparing to restart work
wbthomasonMar 21, 2022
d9941ec
Simplify headless check
wbthomasonApr 13, 2022
5722bc5
Simplify ensure_table
wbthomasonApr 13, 2022
4de55a4
Use new Lua commands API for Packer commands
wbthomasonApr 13, 2022
10fb672
Use new Lua autocommands API for PackerComplete
wbthomasonApr 13, 2022
c6177f8
WIP moving to runtime-handlers implementation
wbthomasonApr 13, 2022
bf2fec5
Add path lib
wbthomasonApr 16, 2022
f603132
Make profile lib from compile functions
wbthomasonApr 16, 2022
f4b593f
Always ensure dependencies
wbthomasonApr 16, 2022
395d0f6
Use path lib in config
wbthomasonApr 16, 2022
ff520c2
Signal existence of profiling threshold config var
wbthomasonApr 16, 2022
0f13f80
Add hooks for modules that need to know about updated config values
wbthomasonApr 16, 2022
ae95b69
WIP everything-as-handlers-no-compile approach
wbthomasonApr 16, 2022
cb44036
Belay changing load for now
wbthomasonApr 16, 2022
b28cc1a
Add proper timed_load and rename old one to timed_packadd
wbthomasonJun 18, 2022
5ca0cc0
Cleanup log module use a bit
wbthomasonJun 18, 2022
681d95d
WIP handler definitions
wbthomasonJun 18, 2022
a076100
Add note about feature request from lewis6991
wbthomasonJul 11, 2022
c77c86a
First draft of rewrite roadmap
wbthomasonSep 1, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
Use new Lua commands API for Packer commands
  • Loading branch information
@wbthomason
wbthomason committedApr 13, 2022
commit4de55a4cde3394d9c7873dbf2bcbdde7edf68b44
61 changes: 59 additions & 2 deletionslua/packer/init.lua
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -289,7 +289,7 @@ end

--- Completion for not-yet-loaded plugin names
--- Used by PackerLoad command
functionM._complete_loadable_plugin_names(lead, _, _)
localfunctioncomplete_loadable_plugin_names(lead, _, _)
ensure_all_plugins_managed()
local completion_list = {}
for name, plugin in pairs(plugins) do
Expand All@@ -303,7 +303,7 @@ end

--- Completion for managed plugin names
--- Used by PackerInstall/Update/Sync commands
functionM._complete_plugin_names(lead, _, _)
localfunctioncomplete_plugin_names(lead, _, _)
ensure_all_plugins_managed()
local completion_list = vim.tbl_filter(function(name)
return vim.startswith(name, lead)
Expand All@@ -312,4 +312,61 @@ function M._complete_plugin_names(lead, _, _)
return completion_list
end

--- packer's predefined commands
local commands = {
{
name = [[PackerInstall]],
command = function(args)
M.install(unpack(args.fargs))
end,
opts = {
nargs = [[*]],
complete = complete_plugin_names,
},
},
{
name = [[PackerUpdate]],
command = function(args)
M.update(unpack(args.fargs))
end,
opts = {
nargs = [[*]],
complete = complete_plugin_names,
},
},
{
name = [[PackerSync]],
command = function(args)
M.sync(unpack(args.fargs))
end,
opts = {
nargs = [[*]],
complete = complete_plugin_names,
},
},
{ name = [[PackerClean]], command = M.clean },
{ name = [[PackerStatus]], command = M.status },
{ name = [[PackerProfileOutput]], command = M.profile_output },
{
name = [[PackerLoad]],
command = function(args)
M.activate_plugins(unpack(args.fargs), args.bang)
end,
opts = {
bang = true,
nargs = [[+]],
complete = complete_loadable_plugin_names,
},
},
}

--- Ensure the existence of packer's standard commands
function M.make_commands()
local create_command = vim.api.nvim_create_user_command
for i = 1, #commands do
local cmd = commands[i]
create_command(cmd.name, cmd.command, cmd.opts)
end
end

return M

[8]ページ先頭

©2009-2025 Movatter.jp