Compare commits

...

3 Commits

Author SHA1 Message Date
glepnir cc4c07e60d
Merge cd771e2785 into c18d7941ef 2024-05-09 16:49:03 +01:00
dundargoc c18d7941ef build: allow sccache as compiler cache
Also enable caching for dependencies.

Closes https://github.com/neovim/neovim/issues/28670
2024-05-09 16:39:45 +02:00
glepnir cd771e2785 refactor(options): generate available options values from lua
Problem: currently the available values of options is split from options meta lua file.

Solution: generate it from lua file.
2024-05-08 20:46:02 +08:00
6 changed files with 264 additions and 86 deletions

View File

@ -50,11 +50,6 @@ file(GLOB DOCFILES CONFIGURE_DEPENDS ${PROJECT_SOURCE_DIR}/runtime/doc/*.txt)
set_directory_properties(PROPERTIES
EP_PREFIX "${DEPS_BUILD_DIR}")
find_program(CCACHE_PRG ccache)
if(CCACHE_PRG)
set(CMAKE_C_COMPILER_LAUNCHER ${CMAKE_COMMAND} -E env CCACHE_SLOPPINESS=pch_defines,time_macros ${CCACHE_PRG})
endif()
if(NOT CI_BUILD)
set(CMAKE_INSTALL_MESSAGE NEVER)
endif()

View File

@ -23,6 +23,12 @@ if(POLICY CMP0092)
list(APPEND DEPS_CMAKE_ARGS -D CMAKE_POLICY_DEFAULT_CMP0092=NEW)
endif()
find_program(CACHE_PRG NAMES ccache sccache)
if(CACHE_PRG)
set(CMAKE_C_COMPILER_LAUNCHER ${CMAKE_COMMAND} -E env CCACHE_SLOPPINESS=pch_defines,time_macros ${CACHE_PRG})
list(APPEND DEPS_CMAKE_CACHE_ARGS -DCMAKE_C_COMPILER_LAUNCHER:STRING=${CMAKE_C_COMPILER_LAUNCHER})
endif()
# MAKE_PRG
if(UNIX)
find_program(MAKE_PRG NAMES gmake make)
@ -58,7 +64,8 @@ function(get_externalproject_options name DEPS_IGNORE_SHA)
set(EXTERNALPROJECT_OPTIONS
DOWNLOAD_NO_PROGRESS TRUE
EXTERNALPROJECT_OPTIONS URL ${${name_allcaps}_URL})
EXTERNALPROJECT_OPTIONS URL ${${name_allcaps}_URL}
CMAKE_CACHE_ARGS ${DEPS_CMAKE_CACHE_ARGS})
if(NOT ${DEPS_IGNORE_SHA})
list(APPEND EXTERNALPROJECT_OPTIONS URL_HASH SHA256=${${name_allcaps}_SHA256})

View File

@ -323,6 +323,7 @@ set(GENERATED_KEYSETS_DEFS ${GENERATED_DIR}/keysets_defs.generated.h)
set(GENERATED_OPTIONS ${GENERATED_DIR}/options.generated.h)
set(GENERATED_OPTIONS_ENUM ${GENERATED_DIR}/options_enum.generated.h)
set(GENERATED_OPTIONS_MAP ${GENERATED_DIR}/options_map.generated.h)
set(GENERATED_OPTIONS_VALUES ${GENERATED_DIR}/options_values.generated.h)
set(GENERATED_UI_EVENTS_CALL ${GENERATED_DIR}/ui_events_call.generated.h)
set(GENERATED_UI_EVENTS_CLIENT ${GENERATED_DIR}/ui_events_client.generated.h)
set(GENERATED_UI_EVENTS_REMOTE ${GENERATED_DIR}/ui_events_remote.generated.h)
@ -642,6 +643,7 @@ list(APPEND NVIM_GENERATED_FOR_HEADERS
"${GENERATED_EVENTS_ENUM}"
"${GENERATED_KEYSETS_DEFS}"
"${GENERATED_OPTIONS_ENUM}"
"${GENERATED_OPTIONS_VALUES}"
)
list(APPEND NVIM_GENERATED_FOR_SOURCES
@ -682,6 +684,11 @@ add_custom_command(OUTPUT ${GENERATED_OPTIONS_ENUM} ${GENERATED_OPTIONS_MAP}
DEPENDS ${LUA_GEN_DEPS} ${OPTIONS_ENUM_GENERATOR} ${CMAKE_CURRENT_LIST_DIR}/options.lua
)
add_custom_command(OUTPUT ${GENERATED_OPTIONS_VALUES}
COMMAND ${LUA_GEN} ${OPTIONS_GENERATOR} ${GENERATED_OPTIONS_VALUES}
DEPENDS ${LUA_GEN_DEPS} ${OPTIONS_GENERATOR} ${CMAKE_CURRENT_LIST_DIR}/options.lua
)
# NVIM_GENERATED_FOR_SOURCES and NVIM_GENERATED_FOR_HEADERS must be mutually exclusive.
foreach(hfile ${NVIM_GENERATED_FOR_HEADERS})
list(FIND NVIM_GENERATED_FOR_SOURCES ${hfile} hfile_idx)

View File

@ -1,12 +1,15 @@
local options_file = arg[1]
local gen_values = options_file:find('options_values') and true or false
local opt_fd = assert(io.open(options_file, 'w'))
local w = function(s)
if s:match('^ %.') then
opt_fd:write(s .. ',\n')
else
opt_fd:write(s .. '\n')
local w = function(s, ...)
local is_values = select(1, ...) or false
if gen_values and is_values then
opt_fd:write(s)
elseif not gen_values then
opt_fd:write(s .. (s:match('^ %.') and ',\n' or '\n'))
end
end
@ -148,6 +151,49 @@ local get_defaults = function(d, n)
return value_dumpers[type(d)](d)
end
---@param opt vim.option_meta
local function generate_valid_values(opt)
local item -- [[string | nil]]
local child_item -- [[string | nil]]
local abbr = opt.abbreviation
local varname = opt.varname or ('p_' .. abbr)
if abbr == 'bh' or abbr == 'bt' or abbr == 'sbo' then
local field = abbr == 'bh' and 'bufhidden' or (abbr == 'sbo' and 'scbopt' or 'buftype')
item = ('static char *(p_%s_values[]) = { '):format(field)
else
item = ('static char *(%s_values[]) = { '):format(varname)
end
if opt.enable_if then
item = '#ifdef ' .. opt.enable_if .. '\n' .. item
end
for idx, val in ipairs(opt.valid_values) do
if type(val) == 'string' then
item = item .. '"' .. val .. '", '
else
for j, k in pairs(val) do
child_item = ('static char *(p_%s_%s_values[]) = { '):format(opt.abbreviation, j)
for subidx, subval in ipairs(k) do
child_item = child_item .. '"' .. subval .. '", '
if subidx == #k then
child_item = ('%s NULL };\n'):format(child_item)
end
end
end
end
if idx == #opt.valid_values then
item = item .. ' NULL };\n'
if opt.enable_if then
item = item .. '#endif\n'
end
end
end
w(item, true)
if child_item then
w(child_item, true)
end
end
--- @type {[1]:string,[2]:string}[]
local defines = {}
@ -228,6 +274,9 @@ local function dump_option(i, o)
w('#endif')
end
end
if gen_values and o.valid_values then
generate_valid_values(o)
end
w(' },')
end

View File

@ -30,6 +30,7 @@
--- @field cb? string
--- @field expand_cb? string
--- @field tags? string[]
--- @field valid_values? (string | table<string, string[]>)[]
--- @class vim.option_defaults
--- @field condition? string
@ -115,6 +116,7 @@ return {
abbreviation = 'ambw',
cb = 'did_set_ambiwidth',
defaults = { if_true = 'single' },
valid_values = { 'single', 'double' },
desc = [=[
Tells Vim what to do with characters with East Asian Width Class
Ambiguous (such as Euro, Registered Sign, Copyright Sign, Greek
@ -309,6 +311,7 @@ return {
abbreviation = 'bg',
cb = 'did_set_background',
defaults = { if_true = 'dark' },
valid_values = { 'light', 'dark' },
desc = [=[
When set to "dark" or "light", adjusts the default color groups for
that background type. The |TUI| or other UI sets this on startup
@ -344,6 +347,7 @@ return {
abbreviation = 'bs',
cb = 'did_set_backspace',
defaults = { if_true = 'indent,eol,start' },
valid_values = { 'indent', 'eol', 'start', 'nostop' },
deny_duplicates = true,
desc = [=[
Influences the working of <BS>, <Del>, CTRL-W and CTRL-U in Insert
@ -393,6 +397,7 @@ return {
abbreviation = 'bkc',
cb = 'did_set_backupcopy',
defaults = { condition = 'UNIX', if_false = 'auto', if_true = 'auto' },
valid_values = { 'yes', 'auto', 'no', 'breaksymlink', 'breakhardlink' },
deny_duplicates = true,
desc = [=[
When writing a file and a backup is made, this option tells how it's
@ -589,6 +594,26 @@ return {
abbreviation = 'bo',
cb = 'did_set_belloff',
defaults = { if_true = 'all' },
valid_values = {
'all',
'backspace',
'cursor',
'complete',
'copy',
'ctrlg',
'error',
'esc',
'ex',
'hangul',
'lang',
'mess',
'showmatch',
'operator',
'register',
'shell',
'spell',
'wildmode',
},
deny_duplicates = true,
desc = [=[
Specifies for which events the bell will not be rung. It is a comma-
@ -739,6 +764,7 @@ return {
alloced = true,
cb = 'did_set_breakindentopt',
defaults = { if_true = '' },
valid_values = { 'shift:', 'min:', 'sbr:', 'list:', 'column:' },
deny_duplicates = true,
desc = [=[
Settings for 'breakindent'. It can consist of the following optional
@ -802,6 +828,7 @@ return {
alloced = true,
cb = 'did_set_bufhidden',
defaults = { if_true = '' },
valid_values = { 'hide', 'unload', 'delete', 'wipe' },
desc = [=[
This option specifies what happens when a buffer is no longer
displayed in a window:
@ -855,6 +882,15 @@ return {
alloced = true,
cb = 'did_set_buftype',
defaults = { if_true = '' },
valid_values = {
'nofile',
'nowrite',
'quickfix',
'help',
'acwrite',
'terminal',
'prompt',
},
desc = [=[
The value of this option specifies the type of a buffer:
<empty> normal buffer
@ -914,6 +950,7 @@ return {
abbreviation = 'cmp',
cb = 'did_set_casemap',
defaults = { if_true = 'internal,keepascii' },
valid_values = { 'internal', 'keepascii' },
deny_duplicates = true,
desc = [=[
Specifies details about changing the case of letters. It may contain
@ -1170,6 +1207,7 @@ return {
abbreviation = 'cb',
cb = 'did_set_clipboard',
defaults = { if_true = '' },
valid_values = { 'unnamed', 'unnamedplus' },
desc = [=[
This option is a list of comma-separated names.
These names are recognized:
@ -1420,6 +1458,15 @@ return {
abbreviation = 'cot',
cb = 'did_set_completeopt',
defaults = { if_true = 'menu,preview' },
valid_values = {
'menu',
'menuone',
'longest',
'preview',
'noinsert',
'noselect',
'popup',
},
deny_duplicates = true,
desc = [=[
A comma-separated list of options for Insert mode completion
@ -1466,6 +1513,7 @@ return {
{
abbreviation = 'csl',
cb = 'did_set_completeslash',
valid_values = { 'slash', 'backslash' },
defaults = { if_true = '' },
desc = [=[
only for MS-Windows
@ -1884,6 +1932,7 @@ return {
abbreviation = 'culopt',
cb = 'did_set_cursorlineopt',
defaults = { if_true = 'both' },
valid_values = { 'line', 'screenline', 'number', 'both' },
deny_duplicates = true,
desc = [=[
Comma-separated list of settings for how 'cursorline' is displayed.
@ -1911,6 +1960,7 @@ return {
{
cb = 'did_set_debug',
defaults = { if_true = '' },
valid_values = { 'msg', 'throw', 'beep' },
desc = [=[
These values can be used:
msg Error messages that would otherwise be omitted will be given
@ -2056,6 +2106,32 @@ return {
alloced = true,
cb = 'did_set_diffopt',
defaults = { if_true = 'internal,filler,closeoff' },
valid_values = {
'filler',
'context',
'iblank',
'icase',
'iwhite',
'iwhiteall',
'iwhiteeol',
'horizontal',
'vertical',
'closeoff',
'hiddenoff',
'foldcolumn',
'followwrap',
'internal',
'indent-heuristic',
'linematch',
{
algorithm = {
'myers',
'minimal',
'patience',
'histogram',
},
},
},
deny_duplicates = true,
desc = [=[
Option settings for diff mode. It can consist of the following items.
@ -2248,6 +2324,7 @@ return {
abbreviation = 'dy',
cb = 'did_set_display',
defaults = { if_true = 'lastline' },
valid_values = { 'lastline', 'truncate', 'uhex', 'msgsep' },
deny_duplicates = true,
desc = [=[
Change the way text is displayed. This is a comma-separated list of
@ -2281,6 +2358,7 @@ return {
abbreviation = 'ead',
cb = 'did_set_eadirection',
defaults = { if_true = 'both' },
valid_values = { 'both', 'ver', 'hor' },
desc = [=[
Tells when the 'equalalways' option applies:
ver vertically, width of windows is not affected
@ -2665,6 +2743,7 @@ return {
if_true = macros('DFLT_FF'),
doc = 'Windows: "dos", Unix: "unix"',
},
valid_values = { 'unix', 'dos', 'mac' },
desc = [=[
This gives the <EOL> of the current buffer, which is used for
reading/writing the buffer from/to a file:
@ -2909,6 +2988,7 @@ return {
abbreviation = 'fcl',
cb = 'did_set_foldclose',
defaults = { if_true = '' },
valid_values = { 'all' },
deny_duplicates = true,
desc = [=[
When set to "all", a fold is closed when the cursor isn't in it and
@ -2929,6 +3009,28 @@ return {
alloced = true,
cb = 'did_set_foldcolumn',
defaults = { if_true = '0' },
valid_values = {
'auto',
'auto:1',
'auto:2',
'auto:3',
'auto:4',
'auto:5',
'auto:6',
'auto:7',
'auto:8',
'auto:9',
'0',
'1',
'2',
'3',
'4',
'5',
'6',
'7',
'8',
'9',
},
desc = [=[
When and how to draw the foldcolumn. Valid values are:
"auto": resize to the minimum amount of folds to display.
@ -3069,6 +3171,14 @@ return {
alloced = true,
cb = 'did_set_foldmethod',
defaults = { if_true = 'manual' },
valid_values = {
'manual',
'expr',
'marker',
'indent',
'syntax',
'diff',
},
desc = [=[
The kind of folding used for the current window. Possible values:
|fold-manual| manual Folds are created manually.
@ -3123,6 +3233,19 @@ return {
abbreviation = 'fdo',
cb = 'did_set_foldopen',
defaults = { if_true = 'block,hor,mark,percent,quickfix,search,tag,undo' },
valid_values = {
'all',
'block',
'hor',
'mark',
'percent',
'quickfix',
'search',
'tag',
'insert',
'undo',
'jump',
},
deny_duplicates = true,
desc = [=[
Specifies for which type of commands folds will be opened, if the
@ -4084,6 +4207,7 @@ return {
abbreviation = 'icm',
cb = 'did_set_inccommand',
defaults = { if_true = 'nosplit' },
valid_values = { 'nosplit', 'split' },
desc = [=[
When nonempty, shows the effects of |:substitute|, |:smagic|,
|:snomagic| and user commands with the |:command-preview| flag as you
@ -4488,6 +4612,7 @@ return {
abbreviation = 'jop',
cb = 'did_set_jumpoptions',
defaults = { if_true = '' },
valid_values = { 'stack', 'view' },
deny_duplicates = true,
desc = [=[
List of words that change the behavior of the |jumplist|.
@ -4535,6 +4660,7 @@ return {
abbreviation = 'km',
cb = 'did_set_keymodel',
defaults = { if_true = '' },
valid_values = { 'startsel', 'stopsel' },
deny_duplicates = true,
desc = [=[
List of comma-separated words, which enable special things that keys
@ -5479,6 +5605,7 @@ return {
abbreviation = 'mousem',
cb = 'did_set_mousemodel',
defaults = { if_true = 'popup_setpos' },
valid_values = { 'extend', 'popup', 'popup_setpos', 'mac' },
desc = [=[
Sets the model to use for the mouse. The name mostly specifies what
the right mouse button is used for:
@ -5678,6 +5805,7 @@ return {
alloced = true,
cb = 'did_set_nrformats',
defaults = { if_true = 'bin,hex' },
valid_values = { 'bin', 'octal', 'hex', 'alpha', 'unsigned' },
deny_duplicates = true,
desc = [=[
This defines what bases Vim will consider for numbers when using the
@ -6197,6 +6325,14 @@ return {
abbreviation = 'rdb',
cb = 'did_set_redrawdebug',
defaults = { if_true = '' },
valid_values = {
'compositor',
'nothrottle',
'invalid',
'nodelta',
'line',
'flush',
},
desc = [=[
Flags to change the way redrawing works, for debugging purposes.
Most useful with 'writedelay' set to some reasonable value.
@ -6653,6 +6789,7 @@ return {
abbreviation = 'sbo',
cb = 'did_set_scrollopt',
defaults = { if_true = 'ver,jump' },
valid_values = { 'ver', 'hor', 'jump' },
deny_duplicates = true,
desc = [=[
This is a comma-separated list of words that specifies how
@ -6718,6 +6855,7 @@ return {
abbreviation = 'sel',
cb = 'did_set_selection',
defaults = { if_true = 'inclusive' },
valid_values = { 'inclusive', 'exclusive', 'old' },
desc = [=[
This option defines the behavior of the selection. It is only used
in Visual and Select mode.
@ -6748,6 +6886,7 @@ return {
abbreviation = 'slm',
cb = 'did_set_selectmode',
defaults = { if_true = '' },
valid_values = { 'mouse', 'key', 'cmd' },
deny_duplicates = true,
desc = [=[
This is a comma-separated list of words, which specifies when to start
@ -6770,6 +6909,26 @@ return {
abbreviation = 'ssop',
cb = 'did_set_sessionoptions',
defaults = { if_true = 'blank,buffers,curdir,folds,help,tabpages,winsize,terminal' },
valid_values = {
'buffers',
'winpos',
'resize',
'winsize',
'localoptions',
'options',
'help',
'blank',
'globals',
'slash',
'unix',
'sesdir',
'curdir',
'folds',
'cursor',
'tabpages',
'terminal',
'skiprtp',
},
deny_duplicates = true,
desc = [=[
Changes the effect of the |:mksession| command. It is a comma-
@ -7415,6 +7574,7 @@ return {
abbreviation = 'sloc',
cb = 'did_set_showcmdloc',
defaults = { if_true = 'last' },
valid_values = { 'last', 'statusline', 'tabline' },
desc = [=[
This option can be used to display the (partially) entered command in
another location. Possible values are:
@ -7567,6 +7727,30 @@ return {
alloced = true,
cb = 'did_set_signcolumn',
defaults = { if_true = 'auto' },
valid_values = {
'yes',
'no',
'auto',
'auto:1',
'auto:2',
'auto:3',
'auto:4',
'auto:5',
'auto:6',
'auto:7',
'auto:8',
'auto:9',
'yes:1',
'yes:2',
'yes:3',
'yes:4',
'yes:5',
'yes:6',
'yes:7',
'yes:8',
'yes:9',
'number',
},
desc = [=[
When and how to draw the signcolumn. Valid values are:
"auto" only when there is a sign to display
@ -7837,6 +8021,7 @@ return {
abbreviation = 'spo',
cb = 'did_set_spelloptions',
defaults = { if_true = '' },
valid_values = { 'camel', 'noplainbuffer' },
deny_duplicates = true,
desc = [=[
A comma-separated list of options for spell checking:
@ -7862,6 +8047,7 @@ return {
abbreviation = 'sps',
cb = 'did_set_spellsuggest',
defaults = { if_true = 'best' },
valid_values = { 'best', 'fast', 'double', 'expr:', 'file:', 'timeout:' },
deny_duplicates = true,
desc = [=[
Methods used for spelling suggestions. Both for the |z=| command and
@ -7955,6 +8141,7 @@ return {
abbreviation = 'spk',
cb = 'did_set_splitkeep',
defaults = { if_true = 'cursor' },
valid_values = { 'cursor', 'screen', 'topline' },
desc = [=[
The value of this option determines the scroll behavior when opening,
closing or resizing horizontal splits.
@ -8384,6 +8571,7 @@ return {
abbreviation = 'swb',
cb = 'did_set_switchbuf',
defaults = { if_true = 'uselast' },
valid_values = { 'useopen', 'usetab', 'split', 'newtab', 'vsplit', 'uselast' },
deny_duplicates = true,
desc = [=[
This option controls the behavior when switching between buffers.
@ -8640,6 +8828,7 @@ return {
abbreviation = 'tc',
cb = 'did_set_tagcase',
defaults = { if_true = 'followic' },
valid_values = { 'followic', 'ignore', 'match', 'followscs', 'smart' },
desc = [=[
This option specifies how case is handled when searching the tags
file:
@ -8804,6 +8993,7 @@ return {
abbreviation = 'tpf',
cb = 'did_set_termpastefilter',
defaults = { if_true = 'BS,HT,ESC,DEL' },
valid_values = { 'BS', 'HT', 'FF', 'ESC', 'DEL', 'C0', 'C1' },
deny_duplicates = true,
desc = [=[
A comma-separated list of options for specifying control characters
@ -9403,6 +9593,7 @@ return {
abbreviation = 've',
cb = 'did_set_virtualedit',
defaults = { if_true = '' },
valid_values = { 'block', 'insert', 'all', 'onemore', 'none', 'NONE' },
deny_duplicates = true,
desc = [=[
A comma-separated list of these words:
@ -9642,6 +9833,7 @@ return {
abbreviation = 'wim',
cb = 'did_set_wildmode',
defaults = { if_true = 'full' },
valid_values = { 'full', 'longest', 'list', 'lastused' },
deny_duplicates = false,
desc = [=[
Completion mode that is used for the character specified with
@ -9700,6 +9892,7 @@ return {
abbreviation = 'wop',
cb = 'did_set_wildoptions',
defaults = { if_true = 'pum,tagfile' },
valid_values = { 'fuzzy', 'tagfile', 'pum' },
deny_duplicates = true,
desc = [=[
A list of words that change how |cmdline-completion| is done.
@ -9732,6 +9925,7 @@ return {
abbreviation = 'wak',
cb = 'did_set_winaltkeys',
defaults = { if_true = 'menu' },
valid_values = { 'yes', 'menu', 'no' },
desc = [=[
only used in Win32
Some GUI versions allow the access to menu entries by using the ALT

View File

@ -49,6 +49,7 @@
#include "nvim/window.h"
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "options_values.generated.h"
# include "optionstr.c.generated.h"
#endif
@ -67,81 +68,6 @@ static const char e_wrong_number_of_characters_for_field_str[]
static const char e_wrong_character_width_for_field_str[]
= N_("E1512: Wrong character width for field \"%s\"");
static char *(p_ambw_values[]) = { "single", "double", NULL };
static char *(p_bg_values[]) = { "light", "dark", NULL };
static char *(p_bkc_values[]) = { "yes", "auto", "no", "breaksymlink", "breakhardlink", NULL };
static char *(p_bo_values[]) = { "all", "backspace", "cursor", "complete", "copy", "ctrlg", "error",
"esc", "ex", "hangul", "lang", "mess", "showmatch", "operator",
"register", "shell", "spell", "wildmode", NULL };
// Note: Keep this in sync with briopt_check()
static char *(p_briopt_values[]) = { "shift:", "min:", "sbr", "list:", "column:", NULL };
// Note: Keep this in sync with diffopt_changed()
static char *(p_dip_values[]) = { "filler", "context:", "iblank", "icase",
"iwhite", "iwhiteall", "iwhiteeol", "horizontal", "vertical",
"closeoff", "hiddenoff", "foldcolumn:", "followwrap", "internal",
"indent-heuristic", "linematch:", "algorithm:", NULL };
static char *(p_dip_algorithm_values[]) = { "myers", "minimal", "patience", "histogram", NULL };
static char *(p_nf_values[]) = { "bin", "octal", "hex", "alpha", "unsigned", NULL };
static char *(p_ff_values[]) = { FF_UNIX, FF_DOS, FF_MAC, NULL };
static char *(p_cb_values[]) = { "unnamed", "unnamedplus", NULL };
static char *(p_cmp_values[]) = { "internal", "keepascii", NULL };
// Note: Keep this in sync with fill_culopt_flags()
static char *(p_culopt_values[]) = { "line", "screenline", "number", "both", NULL };
static char *(p_dy_values[]) = { "lastline", "truncate", "uhex", "msgsep", NULL };
static char *(p_fdo_values[]) = { "all", "block", "hor", "mark", "percent", "quickfix", "search",
"tag", "insert", "undo", "jump", NULL };
// Note: Keep this in sync with spell_check_sps()
static char *(p_sps_values[]) = { "best", "fast", "double", "expr:", "file:", "timeout:", NULL };
/// Also used for 'viewoptions'! Keep in sync with SSOP_ flags.
static char *(p_ssop_values[]) = { "buffers", "winpos", "resize", "winsize", "localoptions",
"options", "help", "blank", "globals", "slash", "unix", "sesdir",
"curdir", "folds", "cursor", "tabpages", "terminal", "skiprtp",
NULL };
// Keep in sync with SWB_ flags in option_defs.h
static char *(p_swb_values[]) = { "useopen", "usetab", "split", "newtab", "vsplit", "uselast",
NULL };
static char *(p_spk_values[]) = { "cursor", "screen", "topline", NULL };
static char *(p_tc_values[]) = { "followic", "ignore", "match", "followscs", "smart", NULL };
static char *(p_ve_values[]) = { "block", "insert", "all", "onemore", "none", "NONE", NULL };
// Note: Keep this in sync with check_opt_wim()
static char *(p_wim_values[]) = { "full", "longest", "list", "lastused", NULL };
static char *(p_wop_values[]) = { "fuzzy", "tagfile", "pum", NULL };
static char *(p_wak_values[]) = { "yes", "menu", "no", NULL };
static char *(p_mousem_values[]) = { "extend", "popup", "popup_setpos", "mac", NULL };
static char *(p_sel_values[]) = { "inclusive", "exclusive", "old", NULL };
static char *(p_slm_values[]) = { "mouse", "key", "cmd", NULL };
static char *(p_km_values[]) = { "startsel", "stopsel", NULL };
static char *(p_scbopt_values[]) = { "ver", "hor", "jump", NULL };
static char *(p_debug_values[]) = { "msg", "throw", "beep", NULL };
static char *(p_ead_values[]) = { "both", "ver", "hor", NULL };
static char *(p_buftype_values[]) = { "nofile", "nowrite", "quickfix", "help", "acwrite",
"terminal", "prompt", NULL };
static char *(p_bufhidden_values[]) = { "hide", "unload", "delete", "wipe", NULL };
static char *(p_bs_values[]) = { "indent", "eol", "start", "nostop", NULL };
static char *(p_fdm_values[]) = { "manual", "expr", "marker", "indent",
"syntax", "diff", NULL };
static char *(p_fcl_values[]) = { "all", NULL };
static char *(p_cot_values[]) = { "menu", "menuone", "longest", "preview", "noinsert", "noselect",
"popup", NULL };
#ifdef BACKSLASH_IN_FILENAME
static char *(p_csl_values[]) = { "slash", "backslash", NULL };
#endif
static char *(p_scl_values[]) = { "yes", "no", "auto", "auto:1", "auto:2", "auto:3", "auto:4",
"auto:5", "auto:6", "auto:7", "auto:8", "auto:9", "yes:1",
"yes:2", "yes:3", "yes:4", "yes:5", "yes:6", "yes:7", "yes:8",
"yes:9", "number", NULL };
static char *(p_fdc_values[]) = { "auto", "auto:1", "auto:2", "auto:3", "auto:4", "auto:5",
"auto:6", "auto:7", "auto:8", "auto:9", "0", "1", "2", "3", "4",
"5", "6", "7", "8", "9", NULL };
static char *(p_spo_values[]) = { "camel", "noplainbuffer", NULL };
static char *(p_icm_values[]) = { "nosplit", "split", NULL };
static char *(p_jop_values[]) = { "stack", "view", NULL };
static char *(p_tpf_values[]) = { "BS", "HT", "FF", "ESC", "DEL", "C0", "C1", NULL };
static char *(p_rdb_values[]) = { "compositor", "nothrottle", "invalid", "nodelta", "line",
"flush", NULL };
static char *(p_sloc_values[]) = { "last", "statusline", "tabline", NULL };
/// All possible flags for 'shm'.
/// the literal chars before 0 are removed flags. these are safely ignored
static char SHM_ALL[] = { SHM_RO, SHM_MOD, SHM_LINES,