From fcfe535e9877cfdc824dc78f2d19e590400d34cd Mon Sep 17 00:00:00 2001 From: Gregory Anders <8965202+gpanders@users.noreply.github.com> Date: Tue, 6 Jun 2023 11:26:29 -0500 Subject: refactor(defaults): do not use C specific default values for options (#22500) The options 'path', 'include', and 'define' all use C-specific default values. This may have made sense a long time ago when Vim was mostly used just for writing C, but this is no longer the case, and we have ample support for filetype specific configuration. Make the default values of these options empty and move the C-specific values into a filetype plugin where they belong. Co-authored-by: zeertzjq --- test/functional/api/buffer_spec.lua | 2 +- test/old/testdir/setup.vim | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/functional/api/buffer_spec.lua b/test/functional/api/buffer_spec.lua index bf9e952319..d9d4539fe8 100644 --- a/test/functional/api/buffer_spec.lua +++ b/test/functional/api/buffer_spec.lua @@ -706,7 +706,7 @@ describe('api/buf', function() nvim('set_option_value', 'define', 'test', {buf = 0}) eq('test', nvim('get_option_value', 'define', {buf = 0})) -- Doesn't change the global value - eq([[^\s*#\s*define]], nvim('get_option_value', 'define', {scope='global'})) + eq("", nvim('get_option_value', 'define', {scope='global'})) end) it('returns values for unset local options', function() diff --git a/test/old/testdir/setup.vim b/test/old/testdir/setup.vim index 9c53c0466d..94fbf2bef1 100644 --- a/test/old/testdir/setup.vim +++ b/test/old/testdir/setup.vim @@ -3,12 +3,14 @@ if exists('s:did_load') set backspace= set commentstring=/*%s*/ set complete=.,w,b,u,t,i + set define=^\\s*#\\s*define set directory& set directory^=. set display= set fillchars=vert:\|,foldsep:\|,fold:- set formatoptions=tcq set fsync + set include=^\\s*#\\s*include set laststatus=1 set listchars=eol:$ set joinspaces -- cgit