aboutsummaryrefslogtreecommitdiff
path: root/runtime/ftplugin/c.lua
blob: 6e68df18d0c12b6503ac8c7a6d695d30e1a537cb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
-- 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<'