diff --git a/lua/custom_telescope.lua b/lua/custom_telescope.lua deleted file mode 100644 index 69b010b..0000000 --- a/lua/custom_telescope.lua +++ /dev/null @@ -1,13 +0,0 @@ -local telescope = require('telescope.builtin') - -local M = {} - -function M.search_markdown_tasks() - telescope.grep_string({ - prompt_title = "Open Task List", - search = "- [ ]", -- Customize if needed for specific task markers - cwd = vim.fn.expand('%:p:h') -- Current file's directory - }) -end - -return M diff --git a/lua/mappings.lua b/lua/mappings.lua index ebd55e1..c063bb3 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -9,10 +9,9 @@ map("i", "jk", "") -- map({ "n", "i", "v" }, "", " w ") --- local custom_telescope = require('custom_telescope') - --- Add a keybinding for searching Markdown tasks -vim.api.nvim_set_keymap('n', 'mt', ':lua require("custom_telescope").search_markdown_tasks()', { noremap = true, silent = true }) +-- open tasks / priority tasks vault-wide (telescope_tasks.lua) +map('n', 'tl', function() require('telescope_tasks').open_tasks() end, { desc = "telescope: open tasks" }) +map('n', 'tL', function() require('telescope_tasks').priority_tasks() end, { desc = "telescope: priority tasks" }) -- Add a keybinding for calling ObsidianTag vim.api.nvim_set_keymap('n', 'tt', ':ObsidianTag', { noremap = true, silent = true }) -- Add a keybinding for calling ObsidianBacklinks @@ -70,5 +69,10 @@ end, { desc = "Format buffer / selection" }) vim.keymap.del({ "n", "t" }, "") vim.keymap.del({ "n", "t" }, "") +-- Vault-wide find-and-replace with confirmation popup +vim.keymap.set("n", "rn", function() + require("rename_term").run() +end, { desc = "Rename term across vault (find → replace)" }) + -- td: time-track markdown todos — all in ~/setup_env/dotfiles/nvim/{td,td_mappings}.lua require("td_mappings")