refactor(config): remove legacy gcal top-level config key (#51)
* refactor(config): remove legacy gcal top-level config key
Problem: the gcal migration shim silently accepted vim.g.pending = { gcal
= {...} } and copied it to sync.gcal, adding complexity and a deprecated
API surface.
Solution: remove the migration block in config.get(), drop the cfg.gcal
fallback in gcal_config(), delete the two migration tests, and clean up
the vimdoc references. Callers must now use sync.gcal directly.
* ci: fix
* fix(spec): remove duplicate buffer require in complete_spec
This commit is contained in:
parent
ef58f69f74
commit
0cdb4e6dd6
5 changed files with 9 additions and 49 deletions
|
|
@ -45,7 +45,6 @@
|
|||
---@field debug? boolean
|
||||
---@field keymaps pending.Keymaps
|
||||
---@field sync? pending.SyncConfig
|
||||
---@field gcal? pending.GcalConfig
|
||||
---@field icons pending.Icons
|
||||
|
||||
---@class pending.config
|
||||
|
|
@ -101,10 +100,6 @@ function M.get()
|
|||
end
|
||||
local user = vim.g.pending or {}
|
||||
_resolved = vim.tbl_deep_extend('force', defaults, user)
|
||||
if _resolved.gcal and not (_resolved.sync and _resolved.sync.gcal) then
|
||||
_resolved.sync = _resolved.sync or {}
|
||||
_resolved.sync.gcal = _resolved.gcal
|
||||
end
|
||||
return _resolved
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ local SCOPE = 'https://www.googleapis.com/auth/calendar'
|
|||
---@return table<string, any>
|
||||
local function gcal_config()
|
||||
local cfg = config.get()
|
||||
return (cfg.sync and cfg.sync.gcal) or cfg.gcal or {}
|
||||
return (cfg.sync and cfg.sync.gcal) or {}
|
||||
end
|
||||
|
||||
---@return string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue