aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/options.lua
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2024-11-25 19:15:05 +0000
committerJosh Rahm <joshuarahm@gmail.com>2024-11-25 19:27:38 +0000
commitc5d770d311841ea5230426cc4c868e8db27300a8 (patch)
treedd21f70127b4b8b5f109baefc8ecc5016f507c91 /src/nvim/options.lua
parent9be89f131f87608f224f0ee06d199fcd09d32176 (diff)
parent081beb3659bd6d8efc3e977a160b1e72becbd8a2 (diff)
downloadrneovim-c5d770d311841ea5230426cc4c868e8db27300a8.tar.gz
rneovim-c5d770d311841ea5230426cc4c868e8db27300a8.tar.bz2
rneovim-c5d770d311841ea5230426cc4c868e8db27300a8.zip
Merge remote-tracking branch 'upstream/master' into mix_20240309
Diffstat (limited to 'src/nvim/options.lua')
-rw-r--r--src/nvim/options.lua531
1 files changed, 278 insertions, 253 deletions
diff --git a/src/nvim/options.lua b/src/nvim/options.lua
index 932d8f8d0e..9f86ef7489 100644
--- a/src/nvim/options.lua
+++ b/src/nvim/options.lua
@@ -7,14 +7,12 @@
--- @field alias? string|string[]
--- @field short_desc? string|fun(): string
--- @field varname? string
---- @field pv_name? string
---- @field type 'boolean'|'number'|'string'
---- @field hidden? boolean
+--- @field type vim.option_type|vim.option_type[]
--- @field immutable? boolean
--- @field list? 'comma'|'onecomma'|'commacolon'|'onecommacolon'|'flags'|'flagscomma'
--- @field scope vim.option_scope[]
--- @field deny_duplicates? boolean
---- @field enable_if? string|false
+--- @field enable_if? string
--- @field defaults? vim.option_defaults
--- @field secure? true
--- @field noglob? true
@@ -42,7 +40,9 @@
--- @field doc? string Default to show in options.txt
--- @field meta? integer|boolean|string Default to use in Lua meta files
---- @alias vim.option_scope 'global'|'buffer'|'window'
+--- @alias vim.option_scope 'global'|'buf'|'win'
+--- @alias vim.option_type 'boolean'|'number'|'string'
+--- @alias vim.option_value boolean|number|string
--- @alias vim.option_redraw
--- |'statuslines'
@@ -61,18 +61,11 @@ local function cstr(s)
end
--- @param s string
---- @return fun(): string
-local function macros(s)
- return function()
- return '.string=' .. s
- end
-end
-
---- @param s string
---- @return fun(): string
-local function imacros(s)
+--- @param t vim.option_type
+--- @return fun(): string, vim.option_type
+local function macros(s, t)
return function()
- return '.number=' .. s
+ return s, t
end
end
@@ -87,17 +80,19 @@ end
-- luacheck: ignore 621
return {
cstr = cstr,
+ --- @type string[]
+ valid_scopes = { 'global', 'buf', 'win' },
--- @type vim.option_meta[]
--- The order of the options MUST be alphabetic for ":set all".
options = {
{
abbreviation = 'al',
defaults = { if_true = 224 },
- enable_if = false,
full_name = 'aleph',
scope = { 'global' },
short_desc = N_('ASCII code of the letter Aleph (Hebrew)'),
type = 'number',
+ immutable = true,
},
{
abbreviation = 'ari',
@@ -179,7 +174,7 @@ return {
]=],
full_name = 'arabic',
redraw = { 'curswant' },
- scope = { 'window' },
+ scope = { 'win' },
short_desc = N_('Arabic as a default second language'),
type = 'boolean',
},
@@ -242,7 +237,7 @@ return {
a different way.
]=],
full_name = 'autoindent',
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('take indent for new line from previous line'),
type = 'boolean',
varname = 'p_ai',
@@ -262,7 +257,7 @@ return {
<
]=],
full_name = 'autoread',
- scope = { 'global', 'buffer' },
+ scope = { 'global', 'buf' },
short_desc = N_('autom. read file when changed outside of Vim'),
type = 'boolean',
varname = 'p_ar',
@@ -435,12 +430,13 @@ return {
useful for example in source trees where all the files are symbolic or
hard links and any changes should stay in the local source tree, not
be propagated back to the original source.
- *crontab*
+ *crontab*
One situation where "no" and "auto" will cause problems: A program
that opens a file, invokes Vim to edit that file, and then tests if
the open file was changed (through the file descriptor) will check the
backup file instead of the newly created file. "crontab -e" is an
- example.
+ example, as are several |file-watcher| daemons like inotify. In that
+ case you probably want to switch this option.
When a copy is made, the original file is truncated and then filled
with the new text. This means that protection bits, owner and
@@ -462,7 +458,7 @@ return {
expand_cb = 'expand_set_backupcopy',
full_name = 'backupcopy',
list = 'onecomma',
- scope = { 'global', 'buffer' },
+ scope = { 'global', 'buf' },
short_desc = N_("make backup as a copy, don't rename the file"),
type = 'string',
varname = 'p_bkc',
@@ -597,6 +593,7 @@ return {
separated list of items. For each item that is present, the bell
will be silenced. This is most useful to specify specific events in
insert mode to be silenced.
+ You can also make it flash by using 'visualbell'.
item meaning when present ~
all All events.
@@ -620,6 +617,7 @@ return {
register Unknown register after <C-R> in |Insert-mode|.
shell Bell from shell output |:!|.
spell Error happened on spell suggest.
+ term Bell from |:terminal| output.
wildmode More matches in |cmdline-completion| available
(depends on the 'wildmode' setting).
@@ -670,7 +668,7 @@ return {
]=],
full_name = 'binary',
redraw = { 'statuslines' },
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('read/write/edit file in binary mode'),
type = 'boolean',
varname = 'p_bin',
@@ -698,7 +696,7 @@ return {
full_name = 'bomb',
no_mkrc = true,
redraw = { 'statuslines' },
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('a Byte Order Mark to the file'),
type = 'boolean',
varname = 'p_bomb',
@@ -732,13 +730,12 @@ return {
]=],
full_name = 'breakindent',
redraw = { 'current_window' },
- scope = { 'window' },
+ scope = { 'win' },
short_desc = N_('wrapped line repeats indent'),
type = 'boolean',
},
{
abbreviation = 'briopt',
- alloced = true,
cb = 'did_set_breakindentopt',
defaults = { if_true = '' },
deny_duplicates = true,
@@ -775,7 +772,7 @@ return {
full_name = 'breakindentopt',
list = 'onecomma',
redraw = { 'current_buffer' },
- scope = { 'window' },
+ scope = { 'win' },
short_desc = N_("settings for 'breakindent'"),
type = 'string',
},
@@ -793,15 +790,14 @@ return {
current Use the current directory.
{path} Use the specified directory
]=],
- enable_if = false,
full_name = 'browsedir',
scope = { 'global' },
short_desc = N_('which directory to start browsing in'),
type = 'string',
+ immutable = true,
},
{
abbreviation = 'bh',
- alloced = true,
cb = 'did_set_bufhidden',
defaults = { if_true = '' },
desc = [=[
@@ -828,7 +824,7 @@ return {
expand_cb = 'expand_set_bufhidden',
full_name = 'bufhidden',
noglob = true,
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('what to do when buffer is no longer in window'),
type = 'string',
varname = 'p_bh',
@@ -846,7 +842,7 @@ return {
]=],
full_name = 'buflisted',
noglob = true,
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('whether the buffer shows up in the buffer list'),
tags = { 'E85' },
type = 'boolean',
@@ -854,7 +850,6 @@ return {
},
{
abbreviation = 'bt',
- alloced = true,
cb = 'did_set_buftype',
defaults = { if_true = '' },
desc = [=[
@@ -906,7 +901,7 @@ return {
expand_cb = 'expand_set_buftype',
full_name = 'buftype',
noglob = true,
- scope = { 'buffer' },
+ scope = { 'buf' },
tags = { 'E382' },
short_desc = N_('special type of buffer'),
type = 'string',
@@ -991,7 +986,7 @@ return {
{
cb = 'did_set_cedit',
defaults = {
- if_true = macros('CTRL_F_STR'),
+ if_true = macros('CTRL_F_STR', 'string'),
doc = 'CTRL-F',
},
desc = [=[
@@ -1021,7 +1016,7 @@ return {
full_name = 'channel',
no_mkrc = true,
nodefault = true,
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('Channel connected to the buffer'),
type = 'number',
varname = 'p_channel',
@@ -1099,14 +1094,13 @@ return {
option or 'indentexpr'.
]=],
full_name = 'cindent',
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('do C program indenting'),
type = 'boolean',
varname = 'p_cin',
},
{
abbreviation = 'cink',
- alloced = true,
defaults = { if_true = '0{,0},0),0],:,0#,!^F,o,O,e' },
deny_duplicates = true,
desc = [=[
@@ -1118,14 +1112,13 @@ return {
]=],
full_name = 'cinkeys',
list = 'onecomma',
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_("keys that trigger indent when 'cindent' is set"),
type = 'string',
varname = 'p_cink',
},
{
abbreviation = 'cino',
- alloced = true,
cb = 'did_set_cinoptions',
defaults = { if_true = '' },
deny_duplicates = true,
@@ -1136,14 +1129,13 @@ return {
]=],
full_name = 'cinoptions',
list = 'onecomma',
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_("how to do indenting when 'cindent' is set"),
type = 'string',
varname = 'p_cino',
},
{
abbreviation = 'cinsd',
- alloced = true,
defaults = { if_true = 'public,protected,private' },
deny_duplicates = true,
desc = [=[
@@ -1155,14 +1147,13 @@ return {
]=],
full_name = 'cinscopedecls',
list = 'onecomma',
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_("words that are recognized by 'cino-g'"),
type = 'string',
varname = 'p_cinsd',
},
{
abbreviation = 'cinw',
- alloced = true,
defaults = { if_true = 'if,else,while,do,for,switch' },
deny_duplicates = true,
desc = [=[
@@ -1175,7 +1166,7 @@ return {
]=],
full_name = 'cinwords',
list = 'onecomma',
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_("words where 'si' and 'cin' add an indent"),
type = 'string',
varname = 'p_cinw',
@@ -1277,7 +1268,7 @@ return {
full_name = 'colorcolumn',
list = 'onecomma',
redraw = { 'current_window', 'highlight_only' },
- scope = { 'window' },
+ scope = { 'win' },
short_desc = N_('columns to highlight'),
type = 'string',
},
@@ -1285,7 +1276,7 @@ return {
abbreviation = 'co',
cb = 'did_set_lines_or_columns',
defaults = {
- if_true = imacros('DFLT_COLS'),
+ if_true = macros('DFLT_COLS', 'number'),
doc = '80 or terminal width',
},
desc = [=[
@@ -1312,7 +1303,6 @@ return {
},
{
abbreviation = 'com',
- alloced = true,
cb = 'did_set_comments',
defaults = { if_true = 's1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:-,fb:•' },
deny_duplicates = true,
@@ -1323,7 +1313,7 @@ return {
]=],
full_name = 'comments',
list = 'onecomma',
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('patterns that can start a comment line'),
tags = { 'E524', 'E525' },
type = 'string',
@@ -1331,7 +1321,6 @@ return {
},
{
abbreviation = 'cms',
- alloced = true,
cb = 'did_set_commentstring',
defaults = { if_true = '' },
desc = [=[
@@ -1340,7 +1329,7 @@ return {
Used for |commenting| and to add markers for folding, see |fold-marker|.
]=],
full_name = 'commentstring',
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('template for comments; used for fold marker'),
tags = { 'E537' },
type = 'string',
@@ -1357,7 +1346,6 @@ return {
},
{
abbreviation = 'cpt',
- alloced = true,
cb = 'did_set_complete',
defaults = { if_true = '.,w,b,u,t' },
deny_duplicates = true,
@@ -1398,7 +1386,7 @@ return {
expand_cb = 'expand_set_complete',
full_name = 'complete',
list = 'onecomma',
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('specify how Insert mode completion works'),
tags = { 'E535' },
type = 'string',
@@ -1406,7 +1394,6 @@ return {
},
{
abbreviation = 'cfu',
- alloced = true,
cb = 'did_set_completefunc',
defaults = { if_true = '' },
desc = [=[
@@ -1421,7 +1408,7 @@ return {
]=],
full_name = 'completefunc',
func = true,
- scope = { 'buffer' },
+ scope = { 'buf' },
secure = true,
short_desc = N_('function to be used for Insert mode completion'),
type = 'string',
@@ -1497,7 +1484,7 @@ return {
expand_cb = 'expand_set_completeopt',
full_name = 'completeopt',
list = 'onecomma',
- scope = { 'global', 'buffer' },
+ scope = { 'global', 'buf' },
short_desc = N_('options for Insert mode completion'),
type = 'string',
varname = 'p_cot',
@@ -1507,7 +1494,7 @@ return {
cb = 'did_set_completeslash',
defaults = { if_true = '' },
desc = [=[
- only for MS-Windows
+ only modifiable in MS-Windows
When this option is set it overrules 'shellslash' for completion:
- When this option is set to "slash", a forward slash is used for path
completion in insert mode. This is useful when editing HTML tag, or
@@ -1522,13 +1509,12 @@ return {
enable_if = 'BACKSLASH_IN_FILENAME',
expand_cb = 'expand_set_completeslash',
full_name = 'completeslash',
- scope = { 'buffer' },
+ scope = { 'buf' },
type = 'string',
varname = 'p_csl',
},
{
abbreviation = 'cocu',
- alloced = true,
cb = 'did_set_concealcursor',
defaults = { if_true = '' },
desc = [=[
@@ -1552,7 +1538,7 @@ return {
full_name = 'concealcursor',
list = 'flags',
redraw = { 'current_window' },
- scope = { 'window' },
+ scope = { 'win' },
short_desc = N_('whether concealable text is hidden in cursor line'),
type = 'string',
},
@@ -1581,7 +1567,7 @@ return {
]=],
full_name = 'conceallevel',
redraw = { 'current_window' },
- scope = { 'window' },
+ scope = { 'win' },
short_desc = N_('whether concealable text is shown or hidden'),
type = 'number',
},
@@ -1619,7 +1605,7 @@ return {
See 'preserveindent'.
]=],
full_name = 'copyindent',
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_("make 'autoindent' use existing indent structure"),
type = 'boolean',
varname = 'p_ci',
@@ -1627,7 +1613,7 @@ return {
{
abbreviation = 'cpo',
cb = 'did_set_cpoptions',
- defaults = { if_true = macros('CPO_VIM') },
+ defaults = { if_true = macros('CPO_VIM', 'string') },
desc = [=[
A sequence of single character flags. When a character is present
this indicates Vi-compatible behavior. This is used for things where
@@ -1880,8 +1866,7 @@ return {
taken into account.
]=],
full_name = 'cursorbind',
- pv_name = 'p_crbind',
- scope = { 'window' },
+ scope = { 'win' },
short_desc = N_('move cursor in window as it moves in other windows'),
type = 'boolean',
},
@@ -1900,7 +1885,7 @@ return {
]=],
full_name = 'cursorcolumn',
redraw = { 'current_window', 'highlight_only' },
- scope = { 'window' },
+ scope = { 'win' },
short_desc = N_('highlight the screen column of the cursor'),
type = 'boolean',
},
@@ -1915,7 +1900,7 @@ return {
]=],
full_name = 'cursorline',
redraw = { 'current_window', 'highlight_only' },
- scope = { 'window' },
+ scope = { 'win' },
short_desc = N_('highlight the screen line of the cursor'),
type = 'boolean',
},
@@ -1943,7 +1928,7 @@ return {
full_name = 'cursorlineopt',
list = 'onecomma',
redraw = { 'current_window', 'highlight_only' },
- scope = { 'window' },
+ scope = { 'win' },
short_desc = N_("settings for 'cursorline'"),
type = 'string',
},
@@ -1971,7 +1956,6 @@ return {
},
{
abbreviation = 'def',
- alloced = true,
defaults = { if_true = '' },
desc = [=[
Pattern to be used to find a macro definition. It is a search
@@ -1995,7 +1979,7 @@ return {
<
]=],
full_name = 'define',
- scope = { 'global', 'buffer' },
+ scope = { 'global', 'buf' },
short_desc = N_('pattern to be used to find a macro definition'),
type = 'string',
varname = 'p_def',
@@ -2052,7 +2036,7 @@ return {
full_name = 'dictionary',
list = 'onecomma',
normal_dname_chars = true,
- scope = { 'global', 'buffer' },
+ scope = { 'global', 'buf' },
short_desc = N_('list of file names used for keyword completion'),
type = 'string',
varname = 'p_dict',
@@ -2067,7 +2051,7 @@ return {
full_name = 'diff',
noglob = true,
redraw = { 'current_window' },
- scope = { 'window' },
+ scope = { 'win' },
short_desc = N_('diff mode for the current window'),
type = 'boolean',
},
@@ -2091,7 +2075,6 @@ return {
},
{
abbreviation = 'dip',
- alloced = true,
cb = 'did_set_diffopt',
defaults = { if_true = 'internal,filler,closeoff' },
deny_duplicates = true,
@@ -2365,7 +2348,7 @@ return {
{
abbreviation = 'enc',
cb = 'did_set_encoding',
- defaults = { if_true = macros('ENC_DFLT') },
+ defaults = { if_true = macros('ENC_DFLT', 'string') },
deny_in_modelines = true,
desc = [=[
String-encoding used internally and for |RPC| communication.
@@ -2394,7 +2377,7 @@ return {
full_name = 'endoffile',
no_mkrc = true,
redraw = { 'statuslines' },
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('write CTRL-Z for last line in file'),
type = 'boolean',
varname = 'p_eof',
@@ -2420,7 +2403,7 @@ return {
full_name = 'endofline',
no_mkrc = true,
redraw = { 'statuslines' },
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('write <EOL> for last line in file'),
type = 'boolean',
varname = 'p_eol',
@@ -2465,7 +2448,7 @@ return {
]=],
expand = true,
full_name = 'equalprg',
- scope = { 'global', 'buffer' },
+ scope = { 'global', 'buf' },
secure = true,
short_desc = N_('external program to use for "=" command'),
type = 'string',
@@ -2489,7 +2472,7 @@ return {
},
{
abbreviation = 'ef',
- defaults = { if_true = macros('DFLT_ERRORFILE') },
+ defaults = { if_true = macros('DFLT_ERRORFILE', 'string') },
desc = [=[
Name of the errorfile for the QuickFix mode (see |:cf|).
When the "-q" command-line argument is used, 'errorfile' is set to the
@@ -2511,7 +2494,7 @@ return {
{
abbreviation = 'efm',
defaults = {
- if_true = macros('DFLT_EFM'),
+ if_true = macros('DFLT_EFM', 'string'),
doc = 'is very long',
},
deny_duplicates = true,
@@ -2521,7 +2504,7 @@ return {
]=],
full_name = 'errorformat',
list = 'onecomma',
- scope = { 'global', 'buffer' },
+ scope = { 'global', 'buf' },
short_desc = N_('description of the lines in the error file'),
type = 'string',
varname = 'p_efm',
@@ -2557,7 +2540,7 @@ return {
on, use CTRL-V<Tab>. See also |:retab| and |ins-expandtab|.
]=],
full_name = 'expandtab',
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('use spaces when <Tab> is inserted'),
type = 'boolean',
varname = 'p_et',
@@ -2586,7 +2569,6 @@ return {
},
{
abbreviation = 'fenc',
- alloced = true,
cb = 'did_set_encoding',
defaults = { if_true = '' },
desc = [=[
@@ -2632,7 +2614,7 @@ return {
full_name = 'fileencoding',
no_mkrc = true,
redraw = { 'statuslines', 'current_buffer' },
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('file encoding for multi-byte text'),
tags = { 'E213' },
type = 'string',
@@ -2700,10 +2682,11 @@ return {
},
{
abbreviation = 'ff',
- alloced = true,
cb = 'did_set_fileformat',
defaults = {
- if_true = macros('DFLT_FF'),
+ condition = 'USE_CRNL',
+ if_true = 'dos',
+ if_false = 'unix',
doc = 'Windows: "dos", Unix: "unix"',
},
desc = [=[
@@ -2727,7 +2710,7 @@ return {
full_name = 'fileformat',
no_mkrc = true,
redraw = { 'curswant', 'statuslines' },
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('file format used for file I/O'),
type = 'string',
varname = 'p_ff',
@@ -2736,7 +2719,9 @@ return {
abbreviation = 'ffs',
cb = 'did_set_fileformats',
defaults = {
- if_true = macros('DFLT_FFS_VIM'),
+ condition = 'USE_CRNL',
+ if_true = 'dos,unix',
+ if_false = 'unix,dos',
doc = 'Windows: "dos,unix", Unix: "unix,dos"',
},
deny_duplicates = true,
@@ -2816,7 +2801,6 @@ return {
},
{
abbreviation = 'ft',
- alloced = true,
cb = 'did_set_filetype_or_syntax',
defaults = { if_true = '' },
desc = [=[
@@ -2845,14 +2829,13 @@ return {
full_name = 'filetype',
noglob = true,
normal_fname_chars = true,
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('type of file, used for autocommands'),
type = 'string',
varname = 'p_ft',
},
{
abbreviation = 'fcs',
- alloced = true,
cb = 'did_set_chars_option',
defaults = { if_true = '' },
deny_duplicates = true,
@@ -2921,12 +2904,72 @@ return {
full_name = 'fillchars',
list = 'onecomma',
redraw = { 'current_window' },
- scope = { 'global', 'window' },
+ scope = { 'global', 'win' },
short_desc = N_('characters to use for displaying special items'),
type = 'string',
varname = 'p_fcs',
},
{
+ abbreviation = 'ffu',
+ cb = 'did_set_findfunc',
+ defaults = { if_true = '' },
+ desc = [=[
+ Function that is called to obtain the filename(s) for the |:find|
+ command. When this option is empty, the internal |file-searching|
+ mechanism is used.
+
+ The value can be the name of a function, a |lambda| or a |Funcref|.
+ See |option-value-function| for more information.
+
+ The function is called with two arguments. The first argument is a
+ |String| and is the |:find| command argument. The second argument is
+ a |Boolean| and is set to |v:true| when the function is called to get
+ a List of command-line completion matches for the |:find| command.
+ The function should return a List of strings.
+
+ The function is called only once per |:find| command invocation.
+ The function can process all the directories specified in 'path'.
+
+ If a match is found, the function should return a |List| containing
+ one or more file names. If a match is not found, the function
+ should return an empty List.
+
+ If any errors are encountered during the function invocation, an
+ empty List is used as the return value.
+
+ It is not allowed to change text or jump to another window while
+ executing the 'findfunc' |textlock|.
+
+ This option cannot be set from a |modeline| or in the |sandbox|, for
+ security reasons.
+
+ Examples:
+ >vim
+ " Use glob()
+ func FindFuncGlob(cmdarg, cmdcomplete)
+ let pat = a:cmdcomplete ? $'{a:cmdarg}*' : a:cmdarg
+ return glob(pat, v:false, v:true)
+ endfunc
+ set findfunc=FindFuncGlob
+
+ " Use the 'git ls-files' output
+ func FindGitFiles(cmdarg, cmdcomplete)
+ let fnames = systemlist('git ls-files')
+ return fnames->filter('v:val =~? a:cmdarg')
+ endfunc
+ set findfunc=FindGitFiles
+ <
+ ]=],
+ full_name = 'findfunc',
+ func = true,
+ scope = { 'global', 'buf' },
+ secure = true,
+ short_desc = N_('function called for :find'),
+ tags = { 'E1514' },
+ type = 'string',
+ varname = 'p_ffu',
+ },
+ {
abbreviation = 'fixeol',
cb = 'did_set_eof_eol_fixeol_bomb',
defaults = { if_true = true },
@@ -2941,7 +2984,7 @@ return {
]=],
full_name = 'fixendofline',
redraw = { 'statuslines' },
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('make sure last line in file has <EOL>'),
type = 'boolean',
varname = 'p_fixeol',
@@ -2967,7 +3010,6 @@ return {
},
{
abbreviation = 'fdc',
- alloced = true,
cb = 'did_set_foldcolumn',
defaults = { if_true = '0' },
desc = [=[
@@ -2982,7 +3024,7 @@ return {
expand_cb = 'expand_set_foldcolumn',
full_name = 'foldcolumn',
redraw = { 'current_window' },
- scope = { 'window' },
+ scope = { 'win' },
short_desc = N_('width of the column used to indicate folds'),
type = 'string',
},
@@ -3000,13 +3042,12 @@ return {
]=],
full_name = 'foldenable',
redraw = { 'current_window' },
- scope = { 'window' },
+ scope = { 'win' },
short_desc = N_('set to display all folds open'),
type = 'boolean',
},
{
abbreviation = 'fde',
- alloced = true,
cb = 'did_set_foldexpr',
defaults = { if_true = '0' },
desc = [=[
@@ -3026,13 +3067,12 @@ return {
full_name = 'foldexpr',
modelineexpr = true,
redraw = { 'current_window' },
- scope = { 'window' },
+ scope = { 'win' },
short_desc = N_('expression used when \'foldmethod\' is "expr"'),
type = 'string',
},
{
abbreviation = 'fdi',
- alloced = true,
cb = 'did_set_foldignore',
defaults = { if_true = '#' },
desc = [=[
@@ -3043,7 +3083,7 @@ return {
]=],
full_name = 'foldignore',
redraw = { 'current_window' },
- scope = { 'window' },
+ scope = { 'win' },
short_desc = N_('ignore lines when \'foldmethod\' is "indent"'),
type = 'string',
},
@@ -3060,7 +3100,7 @@ return {
]=],
full_name = 'foldlevel',
redraw = { 'current_window' },
- scope = { 'window' },
+ scope = { 'win' },
short_desc = N_('close folds with a level higher than this'),
type = 'number',
},
@@ -3087,7 +3127,6 @@ return {
},
{
abbreviation = 'fmr',
- alloced = true,
cb = 'did_set_foldmarker',
defaults = { if_true = '{{{,}}}' },
deny_duplicates = true,
@@ -3100,14 +3139,13 @@ return {
full_name = 'foldmarker',
list = 'onecomma',
redraw = { 'current_window' },
- scope = { 'window' },
+ scope = { 'win' },
short_desc = N_('markers used when \'foldmethod\' is "marker"'),
tags = { 'E536' },
type = 'string',
},
{
abbreviation = 'fdm',
- alloced = true,
cb = 'did_set_foldmethod',
defaults = { if_true = 'manual' },
desc = [=[
@@ -3122,7 +3160,7 @@ return {
expand_cb = 'expand_set_foldmethod',
full_name = 'foldmethod',
redraw = { 'current_window' },
- scope = { 'window' },
+ scope = { 'win' },
short_desc = N_('folding type'),
type = 'string',
},
@@ -3141,7 +3179,7 @@ return {
]=],
full_name = 'foldminlines',
redraw = { 'current_window' },
- scope = { 'window' },
+ scope = { 'win' },
short_desc = N_('minimum number of lines for a fold to be closed'),
type = 'number',
},
@@ -3156,7 +3194,7 @@ return {
]=],
full_name = 'foldnestmax',
redraw = { 'current_window' },
- scope = { 'window' },
+ scope = { 'win' },
short_desc = N_('maximum fold depth'),
type = 'number',
},
@@ -3208,7 +3246,6 @@ return {
},
{
abbreviation = 'fdt',
- alloced = true,
cb = 'did_set_optexpr',
defaults = { if_true = 'foldtext()' },
desc = [=[
@@ -3230,13 +3267,12 @@ return {
full_name = 'foldtext',
modelineexpr = true,
redraw = { 'current_window' },
- scope = { 'window' },
+ scope = { 'win' },
short_desc = N_('expression used to display for a closed fold'),
type = 'string',
},
{
abbreviation = 'fex',
- alloced = true,
cb = 'did_set_optexpr',
defaults = { if_true = '' },
desc = [=[
@@ -3283,14 +3319,13 @@ return {
]=],
full_name = 'formatexpr',
modelineexpr = true,
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('expression used with "gq" command'),
type = 'string',
varname = 'p_fex',
},
{
abbreviation = 'flp',
- alloced = true,
defaults = { if_true = '^\\s*\\d\\+[\\]:.)}\\t ]\\s*' },
desc = [=[
A pattern that is used to recognize a list header. This is used for
@@ -3304,16 +3339,15 @@ return {
character and white space.
]=],
full_name = 'formatlistpat',
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('pattern used to recognize a list header'),
type = 'string',
varname = 'p_flp',
},
{
abbreviation = 'fo',
- alloced = true,
cb = 'did_set_formatoptions',
- defaults = { if_true = macros('DFLT_FO_VIM') },
+ defaults = { if_true = macros('DFLT_FO_VIM', 'string') },
desc = [=[
This is a sequence of letters which describes how automatic
formatting is to be done.
@@ -3325,7 +3359,7 @@ return {
expand_cb = 'expand_set_formatoptions',
full_name = 'formatoptions',
list = 'flags',
- scope = { 'buffer' },
+ scope = { 'buf' },
short_desc = N_('how automatic formatting is to be done'),
type = 'string',
varname = 'p_fo',
@@ -3348,7 +3382,7 @@ return {
]=],
expand = true,
full_name = 'formatprg',
- scope = { 'global', 'buffer' },
+ scope = { 'global', 'buf' },
secure = true,
short_desc = N_('name of external program used with "gq" command'),
type = 'string',
@@ -3406,7 +3440,7 @@ return {
},
{
abbreviation = 'gfm',
- defaults = { if_true = macros('DFLT_GREPFORMAT') },
+ defaults = { if_true = macros('DFLT_GREPFORMAT', 'string') },
deny_duplicates = true,
desc = [=[
Format to recognize for the ":grep" command output.
@@ -3456,7 +3490,7 @@ return {
]=],
expand = true,
full_name = 'grepprg',
- scope = { 'global', 'buffer' },
+ scope = { 'global', 'buf' },
secure = true,
short_desc = N_('program to use for ":grep"'),
type = 'string',
@@ -3761,15 +3795,16 @@ return {
try to keep 'lines' and 'columns' the same when adding and
removing GUI components.
]=],
- enable_if = false,
full_name = 'guioptions',
list = 'flags',
scope = { 'global' },
short_desc = N_('GUI: Which components and options are used'),
type = 'string',
+ immutable = true,
},
{
abbreviation = 'gtl',
+ defaults = { if_true = '' },
desc = [=[
When non-empty describes the text to use in a label of the GUI tab
pages line. When empty and when the result is empty Vim will use a
@@ -3785,16 +3820,17 @@ return {
present in 'guioptions'. For the non-GUI tab pages line 'tabline' is
used.
]=],
- enable_if = false,
full_name = 'guitablabel',
modelineexpr = true,
redraw = { 'current_window' },
scope = { 'global' },
short_desc = N_('GUI: custom label for a tab page'),
type = 'string',
+ immutable = true,
},
{
abbreviation = 'gtt',
+ defaults = { if_true = '' },
desc = [=[
When non-empty describes the text to use in a tooltip for the GUI tab
pages line. When empty Vim will use a default tooltip.
@@ -3803,18 +3839,18 @@ return {
let &guitabtooltip = "line one\nline two"
<
]=],
- enable_if = false,
full_name = 'guitabtooltip',
redraw = { 'current_window' },
scope = { 'global' },
short_desc = N_('GUI: custom tooltip for a tab page'),
type = 'string',
+ immutable = true,
},
{
abbreviation = 'hf',
cb = 'did_set_helpfile',
defaults = {
- if_true = macros('DFLT_HELPFILE'),
+ if_true = macros('DFLT_HELPFILE', 'string'),
doc = [[(MS-Windows) "$VIMRUNTIME\doc\help.txt"
(others) "$VIMRUNTIME/doc/help.txt"]],