feat: rename
This commit is contained in:
parent
47a5c7a5e5
commit
53ab1cc000
21 changed files with 191 additions and 191 deletions
|
|
@ -1,42 +0,0 @@
|
|||
---@class todo.GcalConfig
|
||||
---@field calendar? string
|
||||
---@field credentials_path? string
|
||||
|
||||
---@class todo.Config
|
||||
---@field data_path string
|
||||
---@field default_view 'category'|'priority'
|
||||
---@field default_category string
|
||||
---@field date_format string
|
||||
---@field date_syntax string
|
||||
---@field gcal? task.GcalConfig
|
||||
|
||||
---@class todo.config
|
||||
local M = {}
|
||||
|
||||
---@type todo.Config
|
||||
local defaults = {
|
||||
data_path = vim.fn.stdpath('data') .. '/todo/tasks.json',
|
||||
default_view = 'category',
|
||||
default_category = 'Inbox',
|
||||
date_format = '%b %d',
|
||||
date_syntax = 'due',
|
||||
}
|
||||
|
||||
---@type todo.Config?
|
||||
local _resolved = nil
|
||||
|
||||
---@return todo.Config
|
||||
function M.get()
|
||||
if _resolved then
|
||||
return _resolved
|
||||
end
|
||||
local user = vim.g.todo or {}
|
||||
_resolved = vim.tbl_deep_extend('force', defaults, user)
|
||||
return _resolved
|
||||
end
|
||||
|
||||
function M.reset()
|
||||
_resolved = nil
|
||||
end
|
||||
|
||||
return M
|
||||
Loading…
Add table
Add a link
Reference in a new issue