add keymappings

This commit is contained in:
Paul Trowbridge 2024-10-17 10:11:00 -04:00
parent 17f45981ed
commit 0745f9b329
2 changed files with 5 additions and 1 deletions

View File

@ -4,7 +4,7 @@ local M = {}
function M.search_markdown_tasks()
telescope.grep_string({
prompt_title = "Markdown Tasks",
prompt_title = "Open Task List",
search = "- [ ]", -- Customize if needed for specific task markers
cwd = vim.fn.expand('%:p:h') -- Current file's directory
})

View File

@ -13,6 +13,10 @@ map("i", "jk", "<ESC>")
-- Add a keybinding for searching Markdown tasks
vim.api.nvim_set_keymap('n', '<leader>mt', ':lua require("custom_telescope").search_markdown_tasks()<CR>', { noremap = true, silent = true })
-- Add a keybinding for calling ObsidianTag
vim.api.nvim_set_keymap('n', '<leader>tt', ':ObsidianTag<CR>', { noremap = true, silent = true })
-- Add a keybinding for calling ObsidianBacklinks
vim.api.nvim_set_keymap('n', '<leader>lb', ':ObsidianBacklinks<CR>', { noremap = true, silent = true })
-- Configure Telescope to scroll files with ctrl+j/k
local actions = require('telescope.actions')