c.lua 442 B

123456789101112131415
  1. -- These are the default option values in Vim, but not in Nvim, so must be set explicitly.
  2. vim.bo.commentstring = '// %s'
  3. vim.bo.define = '^\\s*#\\s*define'
  4. vim.bo.include = '^\\s*#\\s*include'
  5. if vim.fn.isdirectory('/usr/include') == 1 then
  6. vim.cmd([[
  7. setlocal path^=/usr/include
  8. setlocal path-=.
  9. setlocal path^=.
  10. ]])
  11. end
  12. vim.b.undo_ftplugin = (vim.b.undo_ftplugin or '') .. '\n setl commentstring< define< include< path<'