Skip to content

Commit 600e4ab

Browse files
authored
Add recommanded script and extension for writing doxygen comments on … (#10001)
Add recommanded script and extension for writing doxygen comments on vscode Signed-off-by: 1078249029 <[email protected]>
1 parent 3251a12 commit 600e4ab

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

documentation/0.doxygen/INDEX.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,42 @@ Then open the browser and enter `http://<IP>:8000/index.html` to access the crea
110110
4. Open the file ./Doxyfile
111111
5. To tab `Run` , Click `Run doxygen`
112112

113+
## How to contribute doxygen comments on vscode more comfortably
114+
115+
There is a script can help you write comments more easily.You can copy the code to your setting.json inner .vscode folder.
116+
117+
```json
118+
"doxdocgen.c.triggerSequence": "/**",
119+
"doxdocgen.c.firstLine": "/**",
120+
"doxdocgen.c.commentPrefix": " * ",
121+
"doxdocgen.c.lastLine": " */",
122+
"doxdocgen.generic.briefTemplate": "@brief ",
123+
124+
//You can set param to @param[in] or @param[out] for your preference
125+
"doxdocgen.generic.paramTemplate": "@param[] {param} \n ",
126+
127+
//You can comment out returnTemplate to auto addof return value type after @return
128+
"doxdocgen.generic.returnTemplate": "@return ",
129+
130+
//You can comment out customTags to unconfig @note line, meanwhile comment out "empty" item before custom item will make comment more compliant
131+
"doxdocgen.generic.customTags":[
132+
"@note "
133+
],
134+
135+
"doxdocgen.generic.order":[
136+
"brief",
137+
"empty",
138+
"param",
139+
"return",
140+
"empty",
141+
"custom",
142+
],
143+
```
144+
145+
If you perfer to write mutiple lines comments at behind one doxygen command, [Auto Comment Blocks][5] extension can auto complete "*" at the start of line when you start a new line.
146+
113147
[1]:https://www.doxygen.nl/
114148
[2]:https://www.doxygen.nl/manual/grouping.html#subpaging
115149
[3]:https://www.doxygen.nl/manual/grouping.html#topics
116150
[4]:https://www.doxygen.nl/manual/docblocks.html
151+
[5]:https://marketplace.visualstudio.com/items?itemName=kevinkyang.auto-comment-blocks

0 commit comments

Comments
 (0)