feat(neorg): Telescope live_grep in neorg working directory
This commit is contained in:
parent
4f45e89025
commit
398736176c
@ -36,6 +36,13 @@ vim.api.nvim_create_autocmd({ "FileType" }, {
|
|||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
local function live_grep_neorg()
|
||||||
|
local neorg_root = '~/Sync/neorg' -- TODO: get it from neorg
|
||||||
|
require('telescope.builtin').live_grep {
|
||||||
|
cwd = neorg_root,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
-- document existing key chains
|
-- document existing key chains
|
||||||
require('which-key').add {
|
require('which-key').add {
|
||||||
{ "<leader>l", group = "neorg [L]ist" },
|
{ "<leader>l", group = "neorg [L]ist" },
|
||||||
@ -69,3 +76,5 @@ vim.api.nvim_set_keymap("n", "<Leader>nl", "<Plug>(neorg.telescope.find_linkable
|
|||||||
{ noremap = true, silent = true, desc = "[N]eorg find [L]inkable" })
|
{ noremap = true, silent = true, desc = "[N]eorg find [L]inkable" })
|
||||||
vim.api.nvim_set_keymap("n", "<Leader>nf", "<Plug>(neorg.telescope.find_norg_files)",
|
vim.api.nvim_set_keymap("n", "<Leader>nf", "<Plug>(neorg.telescope.find_norg_files)",
|
||||||
{ noremap = true, silent = true, desc = "[N]eorg find [F]ile" })
|
{ noremap = true, silent = true, desc = "[N]eorg find [F]ile" })
|
||||||
|
vim.keymap.set("n", "<Leader>n/", live_grep_neorg,
|
||||||
|
{ noremap = true, silent = true, desc = "[N]eorg Live Grep" })
|
||||||
|
Loading…
Reference in New Issue
Block a user