-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
one.lua
39 lines (32 loc) · 833 Bytes
/
one.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
local M = { 'one', desc = 'The functions and commands provided by one.nvim' }
local One = require('one.one')
M.commands = {
OneReset = { One.reset, { desc = 'To remove all plugins and cached files' } },
OneUpdate = {
function(opts)
One.update(opts.args)
end,
{
desc = 'Update the source codes of one.nvim',
nargs = '*',
complete = function()
local list = vim.tbl_keys(One.updateMap)
list[#list + 1] = 'all'
return list
end,
},
},
OneShowConfig = { One.showConfig, {
desc = 'Show the merged config of one.nvim',
nargs = '?',
complete = function(ArgLead, CmdLine, CursorPos)
local keys = {}
for k, _ in pairs(One.CM.config) do
table.insert(keys, k)
end
return keys
end,
} },
OneShowPlugins = { One.showPlugins, { desc = 'Show plugins of one.nvim' } },
}
return M