feat(nvim): add grep_prompt
This commit is contained in:
parent
c0e9fd137f
commit
ecaae11b4d
|
@ -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/" },
|
||||
|
|
|
@ -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")
|
||||
|
||||
|
|
Loading…
Reference in a new issue