mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 19:25:11 -07:00
fcfe535e98
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 <zeertzjq@outlook.com>
15 lines
401 B
Lua
15 lines
401 B
Lua
-- These are the default option values in Vim, but not in Nvim, so must be set explicitly.
|
|
vim.bo.commentstring = '/*%s*/'
|
|
vim.bo.define = '^\\s*#\\s*define'
|
|
vim.bo.include = '^\\s*#\\s*include'
|
|
|
|
if vim.fn.isdirectory('/usr/include') == 1 then
|
|
vim.cmd([[
|
|
setlocal path^=/usr/include
|
|
setlocal path-=.
|
|
setlocal path^=.
|
|
]])
|
|
end
|
|
|
|
vim.b.undo_ftplugin = vim.b.undo_ftplugin .. '|setl path<'
|