aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/options.lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/options.lua')
-rw-r--r--src/nvim/options.lua236
1 files changed, 144 insertions, 92 deletions
diff --git a/src/nvim/options.lua b/src/nvim/options.lua
index d19af4f73f..aba8f8b893 100644
--- a/src/nvim/options.lua
+++ b/src/nvim/options.lua
@@ -7,7 +7,7 @@
-- enable_if=nil,
-- defaults={condition=nil, if_true={vi=224, vim=0}, if_false=nil},
-- secure=nil, gettext=nil, noglob=nil, normal_fname_chars=nil,
--- pri_mkrc=nil, deny_in_modelines=nil,
+-- pri_mkrc=nil, deny_in_modelines=nil, normal_dname_chars=nil,
-- expand=nil, nodefault=nil, no_mkrc=nil, vi_def=true, vim=true,
-- alloced=nil,
-- save_pv_indir=nil,
@@ -17,8 +17,8 @@
-- types: bool, number, string
-- lists: (nil), comma, onecomma, flags, flagscomma
-- scopes: global, buffer, window
--- redraw options: statuslines, current_window, current_buffer, all_windows,
--- everything, curswant
+-- redraw options: statuslines, current_window, curent_window_only,
+-- current_buffer, all_windows, everything, curswant
-- default: {vi=…[, vim=…]}
-- defaults: {condition=#if condition, if_true=default, if_false=default}
-- #if condition:
@@ -34,6 +34,11 @@ local macros=function(s)
return s
end
end
+local imacros=function(s)
+ return function()
+ return '(intptr_t)' .. s
+ end
+end
local N_=function(s)
return function()
return 'N_(' .. cstr(s) .. ')'
@@ -63,7 +68,8 @@ return {
type='bool', scope={'global'},
vi_def=true,
vim=true,
- redraw={'everything'},
+ redraw={'all_windows', 'ui_option'},
+
varname='p_arshape',
defaults={if_true={vi=true}}
},
@@ -86,7 +92,7 @@ return {
full_name='ambiwidth', abbreviation='ambw',
type='string', scope={'global'},
vi_def=true,
- redraw={'everything'},
+ redraw={'all_windows', 'ui_option'},
varname='p_ambw',
defaults={if_true={vi="single"}}
},
@@ -126,10 +132,10 @@ return {
{
full_name='background', abbreviation='bg',
type='string', scope={'global'},
- vi_def=true,
- redraw={'everything'},
+ vim=true,
+ redraw={'all_windows'},
varname='p_bg',
- defaults={if_true={vi="light"}}
+ defaults={if_true={vi="light",vim="dark"}}
},
{
full_name='backspace', abbreviation='bs',
@@ -165,7 +171,7 @@ return {
deny_duplicates=true,
secure=true,
vi_def=true,
- expand=true,
+ expand='nodefault',
varname='p_bdir',
defaults={if_true={vi=''}}
},
@@ -190,7 +196,7 @@ return {
type='string', list='comma', scope={'global'},
vi_def=true,
varname='p_bo',
- defaults={if_true={vi=""}}
+ defaults={if_true={vi="all"}}
},
{
full_name='binary', abbreviation='bin',
@@ -290,6 +296,14 @@ return {
defaults={if_true={vi="", vim=macros('CTRL_F_STR')}}
},
{
+ full_name='channel',
+ type='number', scope={'buffer'},
+ no_mkrc=true,
+ nodefault=true,
+ varname='p_channel',
+ defaults={if_true={vi=0}}
+ },
+ {
full_name='charconvert', abbreviation='ccv',
type='string', scope={'global'},
secure=true,
@@ -519,7 +533,7 @@ return {
vi_def=true,
vim=true,
varname='p_csverbose',
- defaults={if_true={vi=0}}
+ defaults={if_true={vi=1}}
},
{
full_name='cursorbind', abbreviation='crb',
@@ -539,7 +553,7 @@ return {
full_name='cursorline', abbreviation='cul',
type='bool', scope={'window'},
vi_def=true,
- redraw={'current_window'},
+ redraw={'current_window_only'},
defaults={if_true={vi=false}}
},
{
@@ -570,6 +584,7 @@ return {
full_name='dictionary', abbreviation='dict',
type='string', list='onecomma', scope={'global', 'buffer'},
deny_duplicates=true,
+ normal_dname_chars=true,
vi_def=true,
expand=true,
varname='p_dict',
@@ -600,7 +615,7 @@ return {
alloced=true,
redraw={'current_window'},
varname='p_dip',
- defaults={if_true={vi="filler"}}
+ defaults={if_true={vi="internal,filler"}}
},
{
full_name='digraph', abbreviation='dg',
@@ -616,7 +631,7 @@ return {
deny_duplicates=true,
secure=true,
vi_def=true,
- expand=true,
+ expand='nodefault',
varname='p_dir',
defaults={if_true={vi=''}}
},
@@ -627,7 +642,7 @@ return {
vim=true,
redraw={'all_windows'},
varname='p_dy',
- defaults={if_true={vi="", vim="lastline"}}
+ defaults={if_true={vi="", vim="lastline,msgsep"}}
},
{
full_name='eadirection', abbreviation='ead',
@@ -644,11 +659,18 @@ return {
defaults={if_true={vi=false}}
},
{
+ full_name='emoji', abbreviation='emo',
+ type='bool', scope={'global'},
+ vi_def=true,
+ redraw={'all_windows', 'ui_option'},
+ varname='p_emoji',
+ defaults={if_true={vi=true}}
+ },
+ {
full_name='encoding', abbreviation='enc',
type='string', scope={'global'},
deny_in_modelines=true,
vi_def=true,
- redraw={'everything'},
varname='p_enc',
defaults={if_true={vi=macros('ENC_DFLT')}}
},
@@ -703,13 +725,6 @@ return {
defaults={if_true={vi=macros('DFLT_EFM')}}
},
{
- full_name='esckeys', abbreviation='ek',
- type='bool', scope={'global'},
- vim=true,
- varname='p_ek',
- defaults={if_true={vi=false, vim=true}}
- },
- {
full_name='eventignore', abbreviation='ei',
type='string', list='onecomma', scope={'global'},
deny_duplicates=true,
@@ -796,7 +811,7 @@ return {
vi_def=true,
redraw={'all_windows'},
varname='p_fcs',
- defaults={if_true={vi="vert:|,fold:-"}}
+ defaults={if_true={vi=''}}
},
{
full_name='fixendofline', abbreviation='fixeol',
@@ -947,7 +962,7 @@ return {
},
{
full_name='formatprg', abbreviation='fp',
- type='string', scope={'global'},
+ type='string', scope={'global', 'buffer'},
secure=true,
vi_def=true,
expand=true,
@@ -960,7 +975,7 @@ return {
secure=true,
vi_def=true,
varname='p_fs',
- defaults={if_true={vi=true}}
+ defaults={if_true={vi=false}}
},
{
full_name='gdefault', abbreviation='gd',
@@ -986,11 +1001,11 @@ return {
expand=true,
varname='p_gp',
defaults={
- condition='UNIX',
+ condition='WIN32',
-- Add an extra file name so that grep will always
-- insert a file name in the match line. */
- if_true={vi="grep -n $* /dev/null"},
- if_false={vi="grep -n "},
+ if_true={vi="findstr /n $* nul"},
+ if_false={vi="grep -n $* /dev/null"}
}
},
{
@@ -999,37 +1014,33 @@ return {
deny_duplicates=true,
vi_def=true,
varname='p_guicursor',
- defaults={if_true={vi="n-v-c:block,o:hor50,i-ci:hor15,r-cr:hor30,sm:block"}}
+ defaults={if_true={vi="n-v-c-sm:block,i-ci-ve:ver25,r-cr-o:hor20"}}
},
{
full_name='guifont', abbreviation='gfn',
type='string', list='onecomma', scope={'global'},
deny_duplicates=true,
vi_def=true,
- redraw={'everything'},
- enable_if=false,
+ varname='p_guifont',
+ redraw={'ui_option'},
+ defaults={if_true={vi=""}}
},
{
full_name='guifontset', abbreviation='gfs',
type='string', list='onecomma', scope={'global'},
vi_def=true,
- redraw={'everything'},
- enable_if=false,
+ varname='p_guifontset',
+ redraw={'ui_option'},
+ defaults={if_true={vi=""}}
},
{
full_name='guifontwide', abbreviation='gfw',
type='string', list='onecomma', scope={'global'},
deny_duplicates=true,
vi_def=true,
- redraw={'everything'},
- enable_if=false,
- },
- {
- full_name='guiheadroom', abbreviation='ghr',
- type='number', scope={'global'},
- vi_def=true,
- enable_if=false,
- defaults={if_true={vi=50}}
+ redraw={'ui_option'},
+ varname='p_guifontwide',
+ defaults={if_true={vi=""}}
},
{
full_name='guioptions', abbreviation='go',
@@ -1087,7 +1098,6 @@ return {
type='string', list='onecomma', scope={'global'},
deny_duplicates=true,
vi_def=true,
- redraw={'everything'},
varname='p_hl',
defaults={if_true={vi=macros('HIGHLIGHT_INIT')}}
},
@@ -1180,6 +1190,14 @@ return {
}
},
{
+ full_name='inccommand', abbreviation='icm',
+ type='string', scope={'global'},
+ vi_def=true,
+ redraw={'all_windows'},
+ varname='p_icm',
+ defaults={if_true={vi=""}}
+ },
+ {
full_name='include', abbreviation='inc',
type='string', scope={'global', 'buffer'},
vi_def=true,
@@ -1338,6 +1356,12 @@ return {
defaults={if_true={vi=false, vim=true}}
},
{
+ full_name='langremap', abbreviation='lrm',
+ type='bool', scope={'global'},
+ varname='p_lrm',
+ defaults={if_true={vi=true, vim=false}}
+ },
+ {
full_name='laststatus', abbreviation='ls',
type='number', scope={'global'},
vim=true,
@@ -1373,8 +1397,9 @@ return {
full_name='linespace', abbreviation='lsp',
type='number', scope={'global'},
vi_def=true,
- redraw={'everything'},
- enable_if=false,
+ redraw={'ui_option'},
+ varname='p_linespace',
+ defaults={if_true={vi=0}}
},
{
full_name='lisp',
@@ -1431,6 +1456,13 @@ return {
defaults={if_true={vi=""}}
},
{
+ full_name='makeencoding', abbreviation='menc',
+ type='string', scope={'global', 'buffer'},
+ vi_def=true,
+ varname='p_menc',
+ defaults={if_true={vi=""}}
+ },
+ {
full_name='makeprg', abbreviation='mp',
type='string', scope={'global', 'buffer'},
secure=true,
@@ -1459,9 +1491,8 @@ return {
full_name='maxcombine', abbreviation='mco',
type='number', scope={'global'},
vi_def=true,
- redraw={'curswant'},
varname='p_mco',
- defaults={if_true={vi=2}}
+ defaults={if_true={vi=6}}
},
{
full_name='maxfuncdepth', abbreviation='mfd',
@@ -1478,13 +1509,6 @@ return {
defaults={if_true={vi=1000}}
},
{
- full_name='maxmem', abbreviation='mm',
- type='number', scope={'global'},
- vi_def=true,
- varname='p_mm',
- defaults={if_true={vi=macros('DFLT_MAXMEM')}}
- },
- {
full_name='maxmempattern', abbreviation='mmp',
type='number', scope={'global'},
vi_def=true,
@@ -1492,13 +1516,6 @@ return {
defaults={if_true={vi=1000}}
},
{
- full_name='maxmemtot', abbreviation='mmt',
- type='number', scope={'global'},
- vi_def=true,
- varname='p_mmt',
- defaults={if_true={vi=macros('DFLT_MAXMEMTOT')}}
- },
- {
full_name='menuitems', abbreviation='mis',
type='number', scope={'global'},
vi_def=true,
@@ -1556,7 +1573,7 @@ return {
full_name='mouse',
type='string', list='flags', scope={'global'},
varname='p_mouse',
- defaults={if_true={vi="", vim="a"}}
+ defaults={if_true={vi="", vim=""}}
},
{
full_name='mousefocus', abbreviation='mousef',
@@ -1737,6 +1754,7 @@ return {
{
full_name='printexpr', abbreviation='pexpr',
type='string', scope={'global'},
+ secure=true,
vi_def=true,
varname='p_pexpr',
defaults={if_true={vi=""}}
@@ -1751,10 +1769,9 @@ return {
{
full_name='printheader', abbreviation='pheader',
type='string', scope={'global'},
- gettext=true,
vi_def=true,
varname='p_header',
- defaults={if_true={vi=N_("%<%f%h%m%=Page %N")}}
+ defaults={if_true={vi="%<%f%h%m%=Page %N"}}
},
{
full_name='printmbcharset', abbreviation='pmbcs',
@@ -1793,6 +1810,14 @@ return {
defaults={if_true={vi=0}}
},
{
+ full_name='pyxversion', abbreviation='pyx',
+ type='number', scope={'global'},
+ secure=true,
+ vi_def=true,
+ varname='p_pyx',
+ defaults={if_true={vi=0}}
+ },
+ {
full_name='quoteescape', abbreviation='qe',
type='string', scope={'buffer'},
vi_def=true,
@@ -1874,7 +1899,7 @@ return {
vim=true,
redraw={'statuslines'},
varname='p_ru',
- defaults={if_true={vi=false}}
+ defaults={if_true={vi=true}}
},
{
full_name='rulerformat', abbreviation='ruf',
@@ -1891,7 +1916,7 @@ return {
deny_duplicates=true,
secure=true,
vi_def=true,
- expand=true,
+ expand='nodefault',
varname='p_rtp',
defaults={if_true={vi=''}}
},
@@ -1901,7 +1926,15 @@ return {
no_mkrc=true,
vi_def=true,
pv_name='p_scroll',
- defaults={if_true={vi=12}}
+ defaults={if_true={vi=0}}
+ },
+ {
+ full_name='scrollback', abbreviation='scbk',
+ type='number', scope={'buffer'},
+ vi_def=true,
+ varname='p_scbk',
+ redraw={'current_buffer'},
+ defaults={if_true={vi=10000}}
},
{
full_name='scrollbind', abbreviation='scb',
@@ -2005,7 +2038,7 @@ return {
varname='p_shcf',
defaults={
condition='WIN32',
- if_true={vi="/c"},
+ if_true={vi="/s /c"},
if_false={vi="-c"}
}
},
@@ -2016,9 +2049,9 @@ return {
vi_def=true,
varname='p_sp',
defaults={
- condition='UNIX',
- if_true={vi="| tee"},
- if_false={vi=">"},
+ condition='WIN32',
+ if_true={vi=">%s 2>&1"},
+ if_false={vi="| tee"},
}
},
{
@@ -2035,7 +2068,11 @@ return {
secure=true,
vi_def=true,
varname='p_srr',
- defaults={if_true={vi=">"}}
+ defaults={
+ condition='WIN32',
+ if_true={vi=">%s 2>&1"},
+ if_false={vi=">"}
+ }
},
{
full_name='shellslash', abbreviation='ssl',
@@ -2057,7 +2094,11 @@ return {
secure=true,
vi_def=true,
varname='p_sxq',
- defaults={if_true={vi=""}}
+ defaults={
+ condition='WIN32',
+ if_true={vi="\""},
+ if_false={vi=""},
+ }
},
{
full_name='shellxescape', abbreviation='sxe',
@@ -2087,7 +2128,7 @@ return {
type='string', list='flags', scope={'global'},
vim=true,
varname='p_shm',
- defaults={if_true={vi="", vim="filnxtToO"}}
+ defaults={if_true={vi="", vim="filnxtToOF"}}
},
{
full_name='showbreak', abbreviation='sbr',
@@ -2102,11 +2143,7 @@ return {
type='bool', scope={'global'},
vim=true,
varname='p_sc',
- defaults={
- condition='UNIX',
- if_true={vi=false, vim=false},
- if_false={vi=false, vim=true},
- }
+ defaults={if_true={vi=false, vim=true}}
},
{
full_name='showfulltag', abbreviation='sft',
@@ -2133,7 +2170,7 @@ return {
full_name='showtabline', abbreviation='stal',
type='number', scope={'global'},
vi_def=true,
- redraw={'all_windows'},
+ redraw={'all_windows', 'ui_option'},
varname='p_stal',
defaults={if_true={vi=1}}
},
@@ -2142,7 +2179,7 @@ return {
type='number', scope={'global'},
vi_def=true,
varname='p_ss',
- defaults={if_true={vi=0}}
+ defaults={if_true={vi=1}}
},
{
full_name='sidescrolloff', abbreviation='siso',
@@ -2154,6 +2191,14 @@ return {
defaults={if_true={vi=0}}
},
{
+ full_name='signcolumn', abbreviation='scl',
+ type='string', scope={'window'},
+ vi_def=true,
+ alloced=true,
+ redraw={'current_window'},
+ defaults={if_true={vi="auto"}}
+ },
+ {
full_name='smartcase', abbreviation='scs',
type='bool', scope={'global'},
vi_def=true,
@@ -2389,14 +2434,13 @@ return {
full_name='termencoding', abbreviation='tenc',
type='string', scope={'global'},
vi_def=true,
- redraw={'everything'},
defaults={if_true={vi=""}}
},
{
full_name='termguicolors', abbreviation='tgc',
type='bool', scope={'global'},
vi_def=false,
- redraw={'everything'},
+ redraw={'ui_option'},
varname='p_tgc',
defaults={if_true={vi=false}}
},
@@ -2420,6 +2464,7 @@ return {
full_name='thesaurus', abbreviation='tsr',
type='string', list='onecomma', scope={'global', 'buffer'},
deny_duplicates=true,
+ normal_dname_chars=true,
vi_def=true,
expand=true,
varname='p_tsr',
@@ -2465,11 +2510,10 @@ return {
full_name='titleold',
type='string', scope={'global'},
secure=true,
- gettext=true,
no_mkrc=true,
vi_def=true,
varname='p_titleold',
- defaults={if_true={vi=N_("Thanks for flying Vim")}}
+ defaults={if_true={vi=""}}
},
{
full_name='titlestring',
@@ -2484,14 +2528,14 @@ return {
vi_def=true,
vim=true,
varname='p_ttimeout',
- defaults={if_true={vi=false}}
+ defaults={if_true={vi=true}}
},
{
full_name='ttimeoutlen', abbreviation='ttm',
type='number', scope={'global'},
vi_def=true,
varname='p_ttm',
- defaults={if_true={vi=-1}}
+ defaults={if_true={vi=50}}
},
{
full_name='ttyfast', abbreviation='tf',
@@ -2507,7 +2551,7 @@ return {
deny_duplicates=true,
secure=true,
vi_def=true,
- expand=true,
+ expand='nodefault',
varname='p_udir',
defaults={if_true={vi=''}}
},
@@ -2568,7 +2612,7 @@ return {
type='string', scope={'global'},
secure=true,
vi_def=true,
- expand=true,
+ expand='nodefault',
varname='p_vdir',
defaults={if_true={vi=''}}
},
@@ -2578,7 +2622,7 @@ return {
deny_duplicates=true,
vi_def=true,
varname='p_vop',
- defaults={if_true={vi="folds,options,cursor"}}
+ defaults={if_true={vi="folds,options,cursor,curdir"}}
},
{
full_name='viminfo', abbreviation='vi',
@@ -2624,7 +2668,7 @@ return {
type='number', scope={'global'},
vim=true,
varname='p_wc',
- defaults={if_true={vi=macros('Ctrl_E'), vim=macros('TAB')}}
+ defaults={if_true={vi=imacros('Ctrl_E'), vim=imacros('TAB')}}
},
{
full_name='wildcharm', abbreviation='wcm',
@@ -2678,6 +2722,14 @@ return {
defaults={if_true={vi="menu"}}
},
{
+ full_name='winhighlight', abbreviation='winhl',
+ type='string', scope={'window'},
+ vi_def=true,
+ alloced=true,
+ redraw={'current_window'},
+ defaults={if_true={vi=""}}
+ },
+ {
full_name='window', abbreviation='wi',
type='number', scope={'global'},
vi_def=true,