feat: live_grep and grep_string function for additional opts (allow file mask) (#1017)

This commit is contained in:
Nazeeh ElDirghami
2021-08-04 03:07:04 -04:00
committed by GitHub
parent b7cd8c7699
commit ca195e32e0
3 changed files with 28 additions and 10 deletions

View File

@@ -70,6 +70,7 @@ local builtin = {}
---@param opts table: options to pass to the picker
---@field grep_open_files boolean: if true, restrict search to open files only, mutually exclusive with `search_dirs`
---@field search_dirs table: directory/directories to search in, mutually exclusive with `grep_open_files`
---@field additional_args function: function(opts) which returns a table of additional arguments to be passed on
builtin.live_grep = require("telescope.builtin.files").live_grep
--- Searches for the string under your cursor in your current working directory
@@ -77,6 +78,7 @@ builtin.live_grep = require("telescope.builtin.files").live_grep
---@field search string: the query to search
---@field search_dirs table: directory/directories to search in
---@field use_regex boolean: if true, special characters won't be escaped, allows for using regex (default is false)
---@field additional_args function: function(opts) which returns a table of additional arguments to be passed on
builtin.grep_string = require("telescope.builtin.files").grep_string
--- Lists files in your current working directory, respects .gitignore