Skip to content

Commit 749b6fd

Browse files
authored
Add documentation for the config option "Documentation" (#134)
1 parent 1b1fd55 commit 749b6fd

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

config.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,3 +535,23 @@ Available kinds could be found [here](features#kinds) in the Kind column.
535535
Specify semantic token modifiers that clangd should not send to client.
536536

537537
Available modifiers could be found [here](features#modifiers) in the Modifier column.
538+
539+
## Documentation
540+
{:.v22}
541+
542+
Specify server side documentation code comment interpretation.
543+
Affects the format of the documentation string sent to the client for hover and code completions.
544+
Sample block (default):
545+
546+
```yaml
547+
Documentation:
548+
CommentFormat: PlainText
549+
```
550+
551+
### CommentFormat
552+
553+
Determines the comment format of code documentation.
554+
555+
- `PlainText`: interpret code documentation as plain text. Markdown specific syntax will be escaped. On clients supporting markdown, this will result in showing markdown syntax without rendering. E.g. using \*\*bold text\*\* in the documentation comment will be shown as \*\*bold text\*\* and not as **bold text** in the hover/code completion.
556+
- `Markdown`: interpret documentation comments as markdown. Markdown syntax will not be escaped, except for HTML tags. On clients supporting markdown, this will result in rendering all markdown syntax.
557+
- `Doxygen`: interpret code documentation as [doxygen](https://www.doxygen.nl/) comments. In addition to treating the documentation as markdown, this will parse the documentation with Clang's doxygen parser. It will highlight used doxygen commands, convert doxygen commands to markdown syntax and extend hover content with e.g. function parameter or return documentation.

styles.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ a[href^="https://code.woboq.org/"] {
170170
/* Version marker ornaments */
171171
.v6::before, .v7::before, .v8::before, .v9::before, .v10::before, .v11::before, .v12::before,
172172
.v13::before, .v14::before, .v15::before, .v16::before, .v17::before, .v18::before, .v19::before,
173-
.v20::before, .v21::before {
173+
.v20::before, .v21::before, .v22::before {
174174
color: #008;
175175
border-radius: 3px;
176176
padding: 0.2em 0.6em;
@@ -198,6 +198,7 @@ a[href^="https://code.woboq.org/"] {
198198
.v19::before { content: "clangd-19"; }
199199
.v20::before { content: "clangd-20"; }
200200
.v21::before { content: "clangd-21"; }
201+
.v22::before { content: "clangd-22"; }
201202
#edit {
202203
text-decoration: none;
203204
position: absolute;

0 commit comments

Comments
 (0)