feat: rename
This commit is contained in:
parent
c69a3957c8
commit
78a275d096
21 changed files with 191 additions and 191 deletions
39
plugin/pending.lua
Normal file
39
plugin/pending.lua
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
if vim.g.loaded_pending then
|
||||
return
|
||||
end
|
||||
vim.g.loaded_pending = true
|
||||
|
||||
vim.api.nvim_create_user_command('Pending', function(opts)
|
||||
require('pending').command(opts.args)
|
||||
end, {
|
||||
nargs = '*',
|
||||
complete = function(arg_lead, cmd_line)
|
||||
local subcmds = { 'add', 'sync', 'archive' }
|
||||
if not cmd_line:match('^Pending%s+%S') then
|
||||
return vim.tbl_filter(function(s)
|
||||
return s:find(arg_lead, 1, true) == 1
|
||||
end, subcmds)
|
||||
end
|
||||
return {}
|
||||
end,
|
||||
})
|
||||
|
||||
vim.keymap.set('n', '<Plug>(pending-open)', function()
|
||||
require('pending').open()
|
||||
end)
|
||||
|
||||
vim.keymap.set('n', '<Plug>(pending-toggle)', function()
|
||||
require('pending').toggle_complete()
|
||||
end)
|
||||
|
||||
vim.keymap.set('n', '<Plug>(pending-view)', function()
|
||||
require('pending.buffer').toggle_view()
|
||||
end)
|
||||
|
||||
vim.keymap.set('n', '<Plug>(pending-priority)', function()
|
||||
require('pending').toggle_priority()
|
||||
end)
|
||||
|
||||
vim.keymap.set('n', '<Plug>(pending-date)', function()
|
||||
require('pending').prompt_date()
|
||||
end)
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
if vim.g.loaded_todo then
|
||||
return
|
||||
end
|
||||
vim.g.loaded_todo = true
|
||||
|
||||
vim.api.nvim_create_user_command('Todo', function(opts)
|
||||
require('todo').command(opts.args)
|
||||
end, {
|
||||
nargs = '*',
|
||||
complete = function(arg_lead, cmd_line)
|
||||
local subcmds = { 'add', 'sync', 'archive' }
|
||||
if not cmd_line:match('^Todo%s+%S') then
|
||||
return vim.tbl_filter(function(s)
|
||||
return s:find(arg_lead, 1, true) == 1
|
||||
end, subcmds)
|
||||
end
|
||||
return {}
|
||||
end,
|
||||
})
|
||||
|
||||
vim.keymap.set('n', '<Plug>(todo-open)', function()
|
||||
require('todo').open()
|
||||
end)
|
||||
|
||||
vim.keymap.set('n', '<Plug>(todo-toggle)', function()
|
||||
require('todo').toggle_complete()
|
||||
end)
|
||||
|
||||
vim.keymap.set('n', '<Plug>(todo-view)', function()
|
||||
require('todo.buffer').toggle_view()
|
||||
end)
|
||||
|
||||
vim.keymap.set('n', '<Plug>(todo-priority)', function()
|
||||
require('todo').toggle_priority()
|
||||
end)
|
||||
|
||||
vim.keymap.set('n', '<Plug>(todo-date)', function()
|
||||
require('todo').prompt_date()
|
||||
end)
|
||||
Loading…
Add table
Add a link
Reference in a new issue