feat(config): add keymaps table for buffer-local bindings
Problem: Users had no way to customize or disable buffer-local key bindings in the pending buffer. Solution: Add a pending.Keymaps class and keymaps field to pending.Config with defaults for all eight buffer actions. Setting any key to false disables that binding.
This commit is contained in:
parent
c038130a8b
commit
11df8407a1
1 changed files with 21 additions and 0 deletions
|
|
@ -2,6 +2,16 @@
|
|||
---@field calendar? string
|
||||
---@field credentials_path? string
|
||||
|
||||
---@class pending.Keymaps
|
||||
---@field close? string|false
|
||||
---@field toggle? string|false
|
||||
---@field view? string|false
|
||||
---@field priority? string|false
|
||||
---@field date? string|false
|
||||
---@field undo? string|false
|
||||
---@field open_line? string|false
|
||||
---@field open_line_above? string|false
|
||||
|
||||
---@class pending.Config
|
||||
---@field data_path string
|
||||
---@field default_view 'category'|'priority'
|
||||
|
|
@ -12,6 +22,7 @@
|
|||
---@field someday_date string
|
||||
---@field category_order? string[]
|
||||
---@field drawer_height? integer
|
||||
---@field keymaps pending.Keymaps
|
||||
---@field gcal? pending.GcalConfig
|
||||
|
||||
---@class pending.config
|
||||
|
|
@ -27,6 +38,16 @@ local defaults = {
|
|||
recur_syntax = 'rec',
|
||||
someday_date = '9999-12-30',
|
||||
category_order = {},
|
||||
keymaps = {
|
||||
close = 'q',
|
||||
toggle = '<CR>',
|
||||
view = '<Tab>',
|
||||
priority = '!',
|
||||
date = 'D',
|
||||
undo = 'U',
|
||||
open_line = 'o',
|
||||
open_line_above = 'O',
|
||||
},
|
||||
}
|
||||
|
||||
---@type pending.Config?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue