setup_env/dotfiles/nvim/telescope_tasks.lua
Paul Trowbridge 1e4fa75dc7 add telescope_tasks, nvim lua modules, and doc updates
- add telescope_tasks.lua: vault-wide task pickers (<leader>tl / <leader>tL)
- track mappings.lua and rename_term.lua in dotfiles
- update CLAUDE.md: add vault definition, telescope_tasks entry, nvim lua file list
- fix tdo/tdop aliases and ga/gx aliases in .bashrc
- install_nvchad.sh: symlink personal nvim modules after clone

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-05-11 09:36:25 -04:00

39 lines
992 B
Lua

local telescope = require('telescope.builtin')
local M = {}
local function vault_root()
local path = vim.fn.expand('%:p:h')
local home = vim.fn.expand('~')
while path ~= home and path ~= '/' do
if vim.fn.filereadable(path .. '/time.csv') == 1
or vim.fn.isdirectory(path .. '/.obsidian') == 1 then
return path
end
path = vim.fn.fnamemodify(path, ':h')
end
return vim.fn.getcwd()
end
-- all open tasks vault-wide (equivalent to tdo shell alias)
function M.open_tasks()
telescope.grep_string({
prompt_title = "Open Tasks",
search = "\\- \\[[^x~]\\]",
use_regex = true,
cwd = vault_root(),
})
end
-- priority open tasks vault-wide (equivalent to tdop shell alias)
function M.priority_tasks()
telescope.grep_string({
prompt_title = "Priority Tasks",
search = "\\- \\[[^x~]\\].*(🔼|⏫)",
use_regex = true,
cwd = vault_root(),
})
end
return M