diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/options.lua | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/nvim/options.lua b/src/nvim/options.lua index 1d81b570b7..c22bce04c8 100644 --- a/src/nvim/options.lua +++ b/src/nvim/options.lua @@ -3368,6 +3368,8 @@ return { Format to recognize for the ":grep" command output. This is a scanf-like string that uses the same format as the 'errorformat' option: see |errorformat|. + + If ripgrep ('grepprg') is available, this option defaults to `%f:%l:%c:%m`. ]=], full_name = 'grepformat', list = 'onecomma', @@ -3382,8 +3384,7 @@ return { condition = 'MSWIN', if_false = 'grep -n $* /dev/null', if_true = 'findstr /n $* nul', - doc = [["grep -n ", - Unix: "grep -n $* /dev/null"]], + doc = [[see below]], }, desc = [=[ Program to use for the |:grep| command. This option may contain '%' @@ -3401,6 +3402,16 @@ return { apply equally to 'grepprg'. This option cannot be set from a |modeline| or in the |sandbox|, for security reasons. + This option defaults to: + - `rg --vimgrep -uuu $* ...` if ripgrep is available (|:checkhealth|), + - `grep -n $* /dev/null` on Unix, + - `findstr /n $* nul` on Windows. + Ripgrep can perform additional filtering such as using .gitignore rules + and skipping hidden or binary files. This is disabled by default (see the -u option) + to more closely match the behaviour of standard grep. + You can make ripgrep match Vim's case handling using the + -i/--ignore-case and -S/--smart-case options. + An |OptionSet| autocmd can be used to set it up to match automatically. ]=], expand = true, full_name = 'grepprg', |