feat(nvim): add grep_prompt

This commit is contained in:
Oliver Davies 2023-10-11 17:43:55 +01:00
parent c0e9fd137f
commit ecaae11b4d
2 changed files with 9 additions and 0 deletions

View file

@ -124,6 +124,13 @@ function M.git_files()
require("telescope.builtin").git_files(opts)
end
function M.grep_prompt()
require("telescope.builtin").grep_string {
path_display = { "shorten" },
search = vim.fn.input "Grep String > ",
}
end
function M.live_grep()
require("telescope").extensions.live_grep_args.live_grep_args {
file_ignore_patterns = { ".git/" },

View file

@ -32,6 +32,8 @@ telescope_mapper("<leader>fh", "help_tags")
telescope_mapper("<leader>fl", "live_grep")
telescope_mapper("<leader>fo", "oldfiles")
telescope_mapper("<leader>gp", "grep_prompt")
telescope_mapper("<leader>ds", "lsp_document_symbols")
telescope_mapper("<leader>dl", "diagnostics")