diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index 743ede6..9ffbf96 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -89,6 +89,16 @@ return { -- Fuzzy Finder (files, lsp, etc) }) end, { desc = '[/] Fuzzily search in current buffer' }) + -- Vimwiki searches for notes in path specified by $NOTES environment variable + vim.keymap.set('n', 'sv', function() + local notes_path = os.getenv 'NOTES' + if not notes_path then + error 'Please set the $NOTES environment variable' + else + builtin.find_files { cwd = notes_path, prompt_title = 'Notes' } + end + end, { desc = '[S]earch [V]imWiki' }) + -- It's also possible to pass additional configuration options. -- See `:help telescope.builtin.live_grep()` for information about particular keys vim.keymap.set('n', 's/', function()