From 22ca3184d8960cd20c5df9f53be73ace05636673 Mon Sep 17 00:00:00 2001 From: Barrett Ruth Date: Thu, 26 Feb 2026 16:26:08 -0500 Subject: [PATCH] fix(textobj): use correct config variable, raise log level Problem: motion keymaps (]], [[, ]t, [t) were never set because `config.get().debug` referenced an undefined `config` variable, crashing _setup_buf_mappings before the motion loop. Debug logging also used vim.log.levels.DEBUG which is filtered by default. Solution: replace `config` with `cfg` (already in scope) and raise both debug notify calls from DEBUG to INFO. --- lua/pending/init.lua | 5 ++--- lua/pending/textobj.lua | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lua/pending/init.lua b/lua/pending/init.lua index f3182fb..d176646 100644 --- a/lua/pending/init.lua +++ b/lua/pending/init.lua @@ -140,13 +140,12 @@ function M._setup_buf_mappings(bufnr) prev_task = textobj.prev_task, } - local dbg = config.get().debug for name, fn in pairs(motions) do local key = km[name] - if dbg then + if cfg.debug then vim.notify( ('[pending] mapping motion %s → %s (buf=%d)'):format(name, key or 'nil', bufnr), - vim.log.levels.DEBUG + vim.log.levels.INFO ) end if key and key ~= false then diff --git a/lua/pending/textobj.lua b/lua/pending/textobj.lua index e978ad6..62d6db3 100644 --- a/lua/pending/textobj.lua +++ b/lua/pending/textobj.lua @@ -8,7 +8,7 @@ local M = {} ---@return nil local function dbg(...) if config.get().debug then - vim.notify('[pending.textobj] ' .. string.format(...), vim.log.levels.DEBUG) + vim.notify('[pending.textobj] ' .. string.format(...), vim.log.levels.INFO) end end