mirror of
https://github.com/zoriya/telescope.nvim.git
synced 2026-08-16 02:45:09 +00:00
chore: add type annotations
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
---@diagnostic disable: undefined-doc-param
|
||||
|
||||
---@tag telescope.builtin
|
||||
|
||||
---@config { ['field_heading'] = "Options", ["module"] = "telescope.builtin" }
|
||||
@@ -45,17 +47,21 @@ end
|
||||
--
|
||||
--
|
||||
|
||||
--- Search for a string and get results live as you type, respects .gitignore
|
||||
---@param opts table: options to pass to the picker
|
||||
---@class TelescopeLiveGrepOpts : TelescopeBasePickerOpts
|
||||
---@field cwd string: root dir to search from (default: cwd, use utils.buffer_dir() to search relative to open buffer)
|
||||
---@field grep_open_files boolean: if true, restrict search to open files only, mutually exclusive with `search_dirs`
|
||||
---@field search_dirs table: directory/directories/files to search, mutually exclusive with `grep_open_files`
|
||||
---@field search_dirs string[]: directory/directories/files to search, mutually exclusive with `grep_open_files`
|
||||
---@field glob_pattern string|table: argument to be used with `--glob`, e.g. "*.toml", can use the opposite "!*.toml"
|
||||
---@field type_filter string: argument to be used with `--type`, e.g. "rust", see `rg --type-list`
|
||||
---@field additional_args function|table: additional arguments to be passed on. Can be fn(opts) -> tbl
|
||||
---@field max_results number: define a upper result value
|
||||
---@field disable_coordinates boolean: don't show the line & row numbers (default: false)
|
||||
---@field file_encoding string: file encoding for the entry & previewer
|
||||
---@field vimgrep_arguments string[]: cmd to use for the search
|
||||
---@field [string] any
|
||||
|
||||
--- Search for a string and get results live as you type, respects .gitignore
|
||||
---@param opts TelescopeLiveGrepOpts: options to pass to the picker
|
||||
builtin.live_grep = require_on_exported_call("telescope.builtin.__files").live_grep
|
||||
|
||||
--- Searches for the string under your cursor or the visual selection in your current working directory
|
||||
|
||||
Reference in New Issue
Block a user