aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc
diff options
context:
space:
mode:
authorLuna Saphie Mittelbach <lunarlambda@gmail.com>2024-04-14 12:54:10 +0200
committerChristian Clason <c.clason@uni-graz.at>2024-04-16 19:21:02 +0200
commit20b38677c22b0ff19ea54396c7718b5a8f410ed4 (patch)
treed325a3d445e27e9fdb13cb24cd7b54d9bbfbdc6e /runtime/doc
parentfe4583127f0aaf631b05ad3dff7ebb0126314cf2 (diff)
downloadrneovim-20b38677c22b0ff19ea54396c7718b5a8f410ed4.tar.gz
rneovim-20b38677c22b0ff19ea54396c7718b5a8f410ed4.tar.bz2
rneovim-20b38677c22b0ff19ea54396c7718b5a8f410ed4.zip
feat(defaults): use ripgrep (rg) for 'grepprg' if available
Diffstat (limited to 'runtime/doc')
-rw-r--r--runtime/doc/news.txt1
-rw-r--r--runtime/doc/options.txt15
-rw-r--r--runtime/doc/vim_diff.txt1
3 files changed, 15 insertions, 2 deletions
diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt
index d320db4e51..966d50c382 100644
--- a/runtime/doc/news.txt
+++ b/runtime/doc/news.txt
@@ -375,6 +375,7 @@ The following changes to existing APIs or features add new behavior.
correctly without it. (Use |gF| for filepaths suffixed with ":line:col").
• 'comments' includes "fb:•".
• 'shortmess' includes the "C" flag.
+ • 'grepprg' defaults to using ripgrep if available.
• Automatic linting of treesitter query files (see |ft-query-plugin|).
Can be disabled via: >lua
vim.g.query_lint_on = {}
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 54333ee85d..7b5e3a1c49 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -2851,9 +2851,10 @@ A jump table for the options with a short description can be found at |Q_op|.
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`.
+
*'grepprg'* *'gp'*
-'grepprg' 'gp' string (default "grep -n ",
- Unix: "grep -n $* /dev/null")
+'grepprg' 'gp' string (default see below)
global or local to buffer |global-local|
Program to use for the |:grep| command. This option may contain '%'
and '#' characters, which are expanded like when used in a command-
@@ -2870,6 +2871,16 @@ A jump table for the options with a short description can be found at |Q_op|.
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.
*'guicursor'* *'gcr'* *E545* *E546* *E548* *E549*
'guicursor' 'gcr' string (default "n-v-c-sm:block,i-ci-ve:ver25,r-cr-o:hor20")
diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt
index 82f3fe9b1b..d426f8151f 100644
--- a/runtime/doc/vim_diff.txt
+++ b/runtime/doc/vim_diff.txt
@@ -52,6 +52,7 @@ Defaults *nvim-defaults*
- 'encoding' is UTF-8 (cf. 'fileencoding' for file-content encoding)
- 'fillchars' defaults (in effect) to "vert:│,fold:·,foldsep:│"
- 'formatoptions' defaults to "tcqj"
+- 'grepprg' defaults to using ripgrep if available
- 'hidden' is enabled
- 'history' defaults to 10000 (the maximum)
- 'hlsearch' is enabled