diff --git a/lua/telescope/_extensions/neorg/find_aof_tasks.lua b/lua/telescope/_extensions/neorg/find_aof_tasks.lua index 7ea31e6..b328cc7 100644 --- a/lua/telescope/_extensions/neorg/find_aof_tasks.lua +++ b/lua/telescope/_extensions/neorg/find_aof_tasks.lua @@ -14,16 +14,7 @@ local neorg_loaded, _ = pcall(require, "neorg.modules") assert(neorg_loaded, "Neorg is not loaded - please make sure to load Neorg first") -local states = { - ["undone"] = { "-[ ] ", "NeorgTodoItem1Undone" }, - ["done"] = { "-[x] ", "NeorgTodoItem1Done" }, - ["pending"] = { "-[-] ", "NeorgTodoItem1Pending" }, - ["cancelled"] = { "-[_] ", "NeorgTodoItem1Cancelled" }, - ["uncertain"] = { "-[?] ", "NeorgTodoItem1Uncertain" }, - ["urgent"] = { "-[!] ", "NeorgTodoItem1Urgent" }, - ["recurring"] = { "-[+] ", "NeorgTodoItem1Recurring" }, - ["on_hold"] = { "-[=] ", "NeorgTodoItem1OnHold" }, -} +local states = utils.states local function get_aof_projects() local projects = utils.get_projects() diff --git a/lua/telescope/_extensions/neorg/find_context_tasks.lua b/lua/telescope/_extensions/neorg/find_context_tasks.lua index 4846cbf..80937f4 100644 --- a/lua/telescope/_extensions/neorg/find_context_tasks.lua +++ b/lua/telescope/_extensions/neorg/find_context_tasks.lua @@ -1,3 +1,4 @@ +local utils = require("neorg.telescope_utils") local actions = require("telescope.actions") local actions_set = require("telescope.actions.set") local state = require("telescope.actions.state") @@ -13,16 +14,7 @@ local neorg_loaded, _ = pcall(require, "neorg.modules") assert(neorg_loaded, "Neorg is not loaded - please make sure to load Neorg first") -local states = { - ["undone"] = { "-[ ] ", "NeorgTodoItem1Undone" }, - ["done"] = { "-[x] ", "NeorgTodoItem1Done" }, - ["pending"] = { "-[-] ", "NeorgTodoItem1Pending" }, - ["cancelled"] = { "-[_] ", "NeorgTodoItem1Cancelled" }, - ["uncertain"] = { "-[?] ", "NeorgTodoItem1Uncertain" }, - ["urgent"] = { "-[!] ", "NeorgTodoItem1Urgent" }, - ["recurring"] = { "-[+] ", "NeorgTodoItem1Recurring" }, - ["on_hold"] = { "-[=] ", "NeorgTodoItem1OnHold" }, -} +local states = utils.states local function get_context_tasks() local tasks_raw = neorg.modules.get_module("core.gtd.queries").get("tasks")