Open aerosayan opened 1 year ago
the example is described in "lua/neogen/template.lua", i test in my lazyvim config, it's worked for me.
return {
"danymat/neogen",
dependencies = "nvim-treesitter/nvim-treesitter",
config = true,
opts = {
languages = {
c = {
template = {
annotation_convention = "my_doxygen",
my_doxygen = {
{ nil, "/**", { no_results = true, type = { "func", "file", "class" } } },
{ nil, " * @file", { no_results = true, type = { "file" } } },
{ nil, " * @brief $1", { no_results = true, type = { "func", "file", "class" } } },
{ nil, " */", { no_results = true, type = { "func", "file", "class" } } },
{ nil, "", { no_results = true, type = { "file" } } },
{ nil, "///", { type = { "func", "class", "type" } } },
{ "class_name", " /// @class %s", { type = { "class" } } },
{ "type", "/// @typedef %s", { type = { "type" } } },
{ nil, "/// @brief $1", { type = { "func", "class", "type" } } },
{ nil, "///", { type = { "func", "class", "type" } } },
{ "tparam", "/// @tparam %s $1" },
{ "parameters", "/// @param %s $1" },
{ "return_statement", "/// @return $1" },
{ nil, "///", { type = { "func", "class", "type" } } },
},},},},},}
Hello,
Thanks for creating neogen. I really love using it. It makes doxygen documenting code so easy. Literally saves hours.
Currently you support the default style of doxygen comments for c/c++ i.e
/* doxygen comments here */
Could you please also support
///
based comments?For example, something like this:
This style of comments is actually preferred by many c/c++ devs and it would be amazing if you could support it.
Thanks