Feature suggest: Indent option
See original GitHub issueDescription
Quite a few code projects I worked on use indentation in doxygen blocks. It would be nice to have an option to do this in the extension.
Code example
The blocks I use generally looks like this:
/**
* @brief Print my ints
* One more line
*
* @param[in] The int to print
* @param[in] Another integer
* @return A number
*/
int printMyInt(int i1, int i2);
Where the total width from " * " to the start of the description is 16 characters wide, which fits most keys.
Actual result
/**
* @brief
*
* @param i1
* @param i2
* @return int
*/
int printMyInt(int i1, int i2);
Having an option named something like doxdocgen.generic.indentWith which pads spaces till the specified width, defaulted to 0, would address this. This would not change the behaviour to anyone who doesn’t want to use the feature. As far as I am aware padding spaces like this is allowed in Doxygen.
The reason I prefer this notation in some projects is that APIs with a lot of parameters with a lot of documentation generally get significantly more readable.
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Use the Indent Feature in Lists - Tech-Talk.com
In the Home tab in the Alignment section click the Increase indent button (it has an arrow to the right). This indents the...
Read more >Word: Indents and Tabs - GCF Global
Select the text you want to indent. On the Home tab, click the Increase Indent or Decrease Indent command. The text will indent....
Read more >Adjust indents and spacing - Microsoft Support
Use Paragraph settings to change indentation, line spacing, and alignment.
Read more >Indentation | IntelliJ IDEA Documentation - JetBrains
Open indentation settings in code style scheme. Click the widget and select Configure Indents for 'Language'.
Read more >Feature Request: Hanging indent for numbered/bulleted lists ...
I'd like to suggest a feature for smart indenting of soft-wrapped paragraphs, somewhat in the vein of breakindent – but rather than having ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi,
While I do see the use case for the 2nd option, I can’t say I can recall a project using indentation on other places than directly after the tag. (Though I have not seen an extreme lot of projects using doxygen…)
That said, it does look like a more intuitive solution, as the template is the place where people are going to look to customize things.
Not exactly sure what you mean with the first part, but I would think that people who care about such detail, would customize the templates anyway. I would not put those indents in the default templates, leaving it as a customization option. When implementing option 2 I would go - if possible - for something like {indent:16} for an indent to width 16. That sounds much clearer to me than a global setting to set the width of {indent} blocks.
On a side node, there are two references you could use for the indent, either line start or block start:
Simple indent:
Option A:
Option B:
In the projects I worked with, I’ve always seen B, though some might think differently about this.
Thanks for looking into this!
For the projects I work(ed) on the tags param, tparam and return probably cover 80+% of all tags, so having automatic indentation for those sure saves a lot of work 😃