mirror of
				https://github.com/neovim/neovim.git
				synced 2025-11-04 09:44:31 +00:00 
			
		
		
		
	- Don't assume b:undo_ftplugin is set when first modifying it. - Don't assume b:undo_ftplugin already contains some resetting.
		
			
				
	
	
		
			15 lines
		
	
	
		
			442 B
		
	
	
	
		
			Lua
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			442 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 or '') .. '\n setl commentstring< define< include< path<'
 |