-
-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change cpp doxygen style #57
Comments
Hello ! I'm currently in the process of refactoring the codebase to expose more easily the annotation standards, and providing better docs for it ! neogen/lua/neogen/configurations/c.lua Lines 175 to 189 in 7b9157d
This is the template responsible for generating Doxygen in C. You can see that every second parameter of each table is a string, and note that:
So for you, the Doxygen table could be something like: custom = {
{ nil, "/// @file", { no_results = true, type = { "file" } } },
{ nil, "/// @brief $1", { no_results = true, type = { "func", "file" } } },
{ nil, "", { no_results = true, type = { "file" } } },
{ nil, "/// @brief $1", { type = { "func" } } },
{ "tparam", "/// @tparam %s $1" },
{ "parameters", "/// @param %s $1" },
{ "return_statement", "/// @return $1" },
}, And to use in your Neogen setup: require('neogen').setup {
enabled = true,
languages = {
c = {
template = {
annotation_convention = "custom",
custom = {
{ nil, "/// @file", { no_results = true, type = { "file" } } },
{ nil, "/// @brief $1", { no_results = true, type = { "func", "file" } } },
{ nil, "", { no_results = true, type = { "file" } } },
{ nil, "/// @brief $1", { type = { "func" } } },
{ "tparam", "/// @tparam %s $1" },
{ "parameters", "/// @param %s $1" },
{ "return_statement", "/// @return $1" },
},
}
},
...
}
} Tell me if it works ! |
Thank you very much for the detailed answer. Works fine for me. require('neogen').setup {
enabled = true,
languages = {
cpp = {
template = {
annotation_convention = "custom",
custom = {
{ nil, "/// @file", { no_results = true, type = { "file" } } },
{ nil, "/// @brief $1", { no_results = true, type = { "func", "file" } } },
{ nil, "", { no_results = true, type = { "file" } } },
{ nil, "/// @brief $1", { type = { "func" } } },
{ "tparam", "/// @tparam %s $1" },
{ "parameters", "/// @param %s $1" },
{ "return_statement", "/// @return $1" },
},
}
},
}
}
|
Oh yeah right, fixed |
Hi,
is there a way to configure Neogen to use the triple dash style instead of c-style comments?
Currently the doxygen looks like this:
My company code style is like this:
Thank you for this great plugin!
The text was updated successfully, but these errors were encountered: