neovim/runtime/ftplugin/c.lua
zeertzjq 8f5e908110
fix(runtime): update b:undo_ftplugin in Lua runtime files (#29529)
Related to #29506, but adding vim.treesitter.stop() to b:undo_ftplugin
doesn't solve the problem yet.
2024-07-01 17:48:09 +08:00

15 lines
402 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<'