mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 11:15:14 -07:00
054a287dbe
Problem: The default commentstring for C/C++ can lead to invalid code when commenting and does not match the Nvim codebase. Solution: Change commentstring to `// %s` as used by Neovim. Also set all commentstrings that derive from the default C string explicitly (and correctly).
15 lines
400 B
Lua
15 lines
400 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<'
|