From 11df8407a1229d3e1090c2b7b221bcfc54155f98 Mon Sep 17 00:00:00 2001 From: Barrett Ruth Date: Wed, 25 Feb 2026 13:24:09 -0500 Subject: [PATCH] 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. --- lua/pending/config.lua | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/lua/pending/config.lua b/lua/pending/config.lua index 4c9b2f3..3318b3d 100644 --- a/lua/pending/config.lua +++ b/lua/pending/config.lua @@ -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 = '', + view = '', + priority = '!', + date = 'D', + undo = 'U', + open_line = 'o', + open_line_above = 'O', + }, } ---@type pending.Config?