diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2024-05-24 19:18:11 +0000 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2024-05-24 19:18:11 +0000 |
commit | ff7ed8f586589d620a806c3758fac4a47a8e7e15 (patch) | |
tree | 729bbcb92231538fa61dab6c3d890b025484b7f5 /src/nvim/options.lua | |
parent | 376914f419eb08fdf4c1a63a77e1f035898a0f10 (diff) | |
parent | 28c04948a1c887a1cc0cb64de79fa32631700466 (diff) | |
download | rneovim-ff7ed8f586589d620a806c3758fac4a47a8e7e15.tar.gz rneovim-ff7ed8f586589d620a806c3758fac4a47a8e7e15.tar.bz2 rneovim-ff7ed8f586589d620a806c3758fac4a47a8e7e15.zip |
Merge remote-tracking branch 'upstream/master' into mix_20240309
Diffstat (limited to 'src/nvim/options.lua')
-rw-r--r-- | src/nvim/options.lua | 74 |
1 files changed, 50 insertions, 24 deletions
diff --git a/src/nvim/options.lua b/src/nvim/options.lua index 632732d7b7..5173240384 100644 --- a/src/nvim/options.lua +++ b/src/nvim/options.lua @@ -7,6 +7,7 @@ --- @field varname? string --- @field pv_name? string --- @field type 'boolean'|'number'|'string' +--- @field hidden? boolean --- @field immutable? boolean --- @field list? 'comma'|'onecomma'|'commacolon'|'onecommacolon'|'flags'|'flagscomma' --- @field scope vim.option_scope[] @@ -90,6 +91,7 @@ return { { abbreviation = 'al', defaults = { if_true = 224 }, + enable_if = false, full_name = 'aleph', scope = { 'global' }, short_desc = N_('ASCII code of the letter Aleph (Hebrew)'), @@ -99,14 +101,13 @@ return { abbreviation = 'ari', defaults = { if_true = false }, desc = [=[ - Allow CTRL-_ in Insert and Command-line mode. This is default off, to - avoid that users that accidentally type CTRL-_ instead of SHIFT-_ get - into reverse Insert mode, and don't know how to get out. See - 'revins'. + Allow CTRL-_ in Insert mode. This is default off, to avoid that users + that accidentally type CTRL-_ instead of SHIFT-_ get into reverse + Insert mode, and don't know how to get out. See 'revins'. ]=], full_name = 'allowrevins', scope = { 'global' }, - short_desc = N_('allow CTRL-_ in Insert and Command-line mode'), + short_desc = N_('allow CTRL-_ in Insert mode'), type = 'boolean', varname = 'p_ari', }, @@ -1323,7 +1324,7 @@ return { defaults = { if_true = '' }, desc = [=[ A template for a comment. The "%s" in the value is replaced with the - comment text. For example, C uses "/*%s*/". Currently only used to + comment text. For example, C uses "/*%s*/". Used for |commenting| and to add markers for folding, see |fold-marker|. ]=], full_name = 'commentstring', @@ -3367,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', @@ -3379,10 +3382,9 @@ return { abbreviation = 'gp', defaults = { condition = 'MSWIN', - if_false = 'grep -n $* /dev/null', + if_false = 'grep -HIn $* /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 '%' @@ -3390,16 +3392,23 @@ return { line. The placeholder "$*" is allowed to specify where the arguments will be included. Environment variables are expanded |:set_env|. See |option-backslash| about including spaces and backslashes. - When your "grep" accepts the "-H" argument, use this to make ":grep" - also work well with a single file: >vim - set grepprg=grep\ -nH - < Special value: When 'grepprg' is set to "internal" the |:grep| command + Special value: When 'grepprg' is set to "internal" the |:grep| command works like |:vimgrep|, |:lgrep| like |:lvimgrep|, |:grepadd| like |:vimgrepadd| and |:lgrepadd| like |:lvimgrepadd|. See also the section |:make_makeprg|, since most of the comments there 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 -uu ` if ripgrep is available (|:checkhealth|), + - `grep -HIn $* /dev/null` on Unix, + - `findstr /n $* nul` on Windows. + Ripgrep can perform additional filtering such as using .gitignore rules + and skipping hidden 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', @@ -5142,12 +5151,12 @@ return { }, { abbreviation = 'mco', - defaults = { if_true = 6 }, + defaults = { if_true = imacros('MAX_MCO') }, full_name = 'maxcombine', scope = { 'global' }, short_desc = N_('maximum nr of combining characters displayed'), type = 'number', - varname = 'p_mco', + hidden = true, }, { abbreviation = 'mfd', @@ -5459,7 +5468,6 @@ return { When on, the mouse pointer is hidden when characters are typed. The mouse pointer is restored when the mouse is moved. ]=], - enable_if = false, full_name = 'mousehide', redraw = { 'ui_option' }, scope = { 'global' }, @@ -5875,6 +5883,7 @@ return { { abbreviation = 'pt', defaults = { if_true = '' }, + enable_if = false, full_name = 'pastetoggle', scope = { 'global' }, short_desc = N_('No description'), @@ -6573,9 +6582,6 @@ return { top are deleted if new lines exceed this limit. Minimum is 1, maximum is 100000. Only in |terminal| buffers. - - Note: Lines that are not visible and kept in scrollback are not - reflown when the terminal buffer is resized horizontally. ]=], full_name = 'scrollback', redraw = { 'current_buffer' }, @@ -7665,8 +7671,7 @@ return { highlighted with |hl-NonText|. You may also want to add "lastline" to the 'display' option to show as much of the last line as possible. - NOTE: only partly implemented, currently works with CTRL-E, CTRL-Y - and scrolling with the mouse. + NOTE: partly implemented, doesn't work yet for |gj| and |gk|. ]=], full_name = 'smoothscroll', pv_name = 'p_sms', @@ -8406,6 +8411,8 @@ return { "split" when both are present. uselast If included, jump to the previously used window when jumping to errors with |quickfix| commands. + If a window has 'winfixbuf' enabled, 'switchbuf' is currently not + applied to the split window. ]=], expand_cb = 'expand_set_switchbuf', full_name = 'switchbuf', @@ -8530,7 +8537,7 @@ return { appear wrong in many places. The value must be more than 0 and less than 10000. - There are four main ways to use tabs in Vim: + There are five main ways to use tabs in Vim: 1. Always keep 'tabstop' at 8, set 'softtabstop' and 'shiftwidth' to 4 (or 3 or whatever you prefer) and use 'noexpandtab'. Then Vim will use a mix of tabs and spaces, but typing <Tab> and <BS> will @@ -8768,6 +8775,7 @@ return { { abbreviation = 'tenc', defaults = { if_true = '' }, + enable_if = false, full_name = 'termencoding', scope = { 'global' }, short_desc = N_('Terminal encoding'), @@ -9360,6 +9368,7 @@ return { Level Messages ~ ---------------------------------------------------------------------- + 1 Enables Lua tracing (see above). Does not produce messages. 2 When a file is ":source"'ed, or |shada| file is read or written. 3 UI info, terminal capabilities. 4 Shell commands. @@ -9863,8 +9872,8 @@ return { will scroll 'window' minus two lines, with a minimum of one. When 'window' is equal to 'lines' minus one CTRL-F and CTRL-B scroll in a much smarter way, taking care of wrapping lines. - When resizing the Vim window, the value is smaller than 1 or more than - or equal to 'lines' it will be set to 'lines' minus 1. + When resizing the Vim window, and the value is smaller than 1 or more + than or equal to 'lines' it will be set to 'lines' minus 1. Note: Do not confuse this with the height of the Vim window, use 'lines' for that. ]=], @@ -9875,6 +9884,23 @@ return { varname = 'p_window', }, { + abbreviation = 'wfb', + defaults = { if_true = false }, + desc = [=[ + If enabled, the window and the buffer it is displaying are paired. + For example, attempting to change the buffer with |:edit| will fail. + Other commands which change a window's buffer such as |:cnext| will + also skip any window with 'winfixbuf' enabled. However if an Ex + command has a "!" modifier, it can force switching buffers. + ]=], + full_name = 'winfixbuf', + pv_name = 'p_wfb', + redraw = { 'current_window' }, + scope = { 'window' }, + short_desc = N_('pin a window to a specific buffer'), + type = 'boolean', + }, + { abbreviation = 'wfh', defaults = { if_true = false }, desc = [=[ |