🎉🎉A simple and useful plugin to generate doxygen style annotation and comment for cpp more easily.🎉🎉
- 🚀Fast
- ❄️Minimalist and light weight
- 🎈Independent, not depends on any third-party plugins
- ✨comment or cancel comment for the code selected when in visual mode
- 🧨generate doxygen style annotations when the cursor is on the first line of function declaration, class's, etc.
- lazy.nvim
require('lazy').setup({
{ 'paddywz/doxycpp.nvim', ft = { your filetype }, config = function
require('doxycpp').setup()
end},
})
- packer.nvim
use({
{ 'paddywz/doxycpp.nvim', ft = { your filetype }, config = function
require('doxycpp').setup()
end},
})
{
comment = {
['c'] = '//',
['cpp'] = '//',
['lua'] = '--',
['python'] = '#',
['cmake'] = '#',
}
}
the key in table comment is filetype, value is your custom comment symbol
require('doxycpp').setup({
comment = {
['java'] = '//',
}
})
vim.api.nvim_set_keymap('n', 'gcc', '<cmd>Doxycpp<CR>', { noremap = true, silent = true })
vim.api.nvim_set_keymap('v', 'gcc', '<cmd>Doxycpp<CR', { noremap = true, silent = true })
🌟make it work when the function declaration is crrosing multiple lines.
- 🌒Don't work on constructor function unfortunately. But I think we don't need to annotate ctor most of the time.