mirror of
https://github.com/neovim/neovim.git
synced 2026-01-19 11:27:01 +00:00
feat(ftplugin): change 'commentstring' to // %s for C/C++ (#29085)
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).
This commit is contained in:
@@ -406,7 +406,7 @@ describe('runtime:', function()
|
||||
eq('', eval('&commentstring'))
|
||||
eq('', eval('&omnifunc'))
|
||||
exec('edit file.cpp')
|
||||
eq('/*%s*/', eval('&commentstring'))
|
||||
eq('// %s', eval('&commentstring'))
|
||||
eq('ccomplete#Complete', eval('&omnifunc'))
|
||||
end)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user