From 0745f9b329796fb8e2ed4e98ab6404dce202e236 Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Thu, 17 Oct 2024 10:11:00 -0400 Subject: [PATCH] add keymappings --- lua/custom_telescope.lua | 2 +- lua/mappings.lua | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lua/custom_telescope.lua b/lua/custom_telescope.lua index 8d2fd12..69b010b 100644 --- a/lua/custom_telescope.lua +++ b/lua/custom_telescope.lua @@ -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 }) diff --git a/lua/mappings.lua b/lua/mappings.lua index ba5d6b6..a840df4 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -13,6 +13,10 @@ map("i", "jk", "") -- 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 }) +-- Add a keybinding for calling ObsidianTag +vim.api.nvim_set_keymap('n', 'tt', ':ObsidianTag', { noremap = true, silent = true }) +-- Add a keybinding for calling ObsidianBacklinks +vim.api.nvim_set_keymap('n', 'lb', ':ObsidianBacklinks', { noremap = true, silent = true }) -- Configure Telescope to scroll files with ctrl+j/k local actions = require('telescope.actions')