Notes search

This commit is contained in:
Imbus 2024-08-16 16:26:10 +02:00
parent 43f63558c4
commit 78055e25b6

View file

@ -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', '<leader>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', '<leader>s/', function()