Skip to content

Commit 8cddcf6

Browse files
Document new config options in clangd 20 (#122)
1 parent 07116b2 commit 8cddcf6

File tree

2 files changed

+58
-2
lines changed

2 files changed

+58
-2
lines changed

config.md

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,26 @@ declarations, always spell out the whole name (with or without leading::).
215215
All nested namespaces are affected as well.
216216
Affects availability of the AddUsing tweak.
217217
218+
### QuotedHeaders
219+
{:.v20}
220+
221+
A list of regexes. Headers whose path matches one of these regexes are
222+
inserted using `""` syntax.
223+
224+
### AngledHeaders
225+
{:.v20}
226+
227+
A list of regexes. Headers whose path matches one of these regexes are
228+
inserted using `<>` syntax.
229+
230+
Example:
231+
232+
```
233+
Style:
234+
QuotedHeaders: "src/.*"
235+
AngledHeaders: ["path/sdk/.*", "third-party/.*"]
236+
```
237+
218238
## Diagnostics
219239
{:.v12}
220240
@@ -327,12 +347,30 @@ Enables Include Cleaner's [missing includes diagnostics](/design/include-cleaner
327347
Possible values: `None` (default), `Strict`.
328348

329349
## Completion
330-
{:.v13}
331350

332351
### AllScopes
352+
{:.v13}
333353
Whether code completion should include suggestions from scopes that are
334354
not visible. The required scope prefix will be inserted.
335355

356+
### ArgumentLists
357+
{:.v20}
358+
359+
Determines what is inserted in argument list position when completing a
360+
call to a function. Here are the valid values and examples of the
361+
corresponding behaviour, assuming a function `foo(int arg)` exists
362+
(`^` represents the cursor position):
363+
364+
- `None`: `fo^` completes to `foo`
365+
- `OpenDelimeter`: `fo^` completes to `foo(^`
366+
- `Delimeters`: `fo^` completes to `foo(^)`
367+
- `FullPlaceholders`: `fo^` completes to `foo(int arg)`, with `int arg` selected
368+
369+
The default is `FullPlaceholders`.
370+
371+
This option governs the completion of template names as well, where
372+
the delimiters are `<>`.
373+
336374
## InlayHints
337375
{:.v14}
338376

@@ -345,6 +383,7 @@ InlayHints:
345383
Enabled: Yes
346384
ParameterNames: Yes
347385
DeducedTypes: Yes
386+
DefaultArguments: No
348387
TypeNameLimit: 24
349388
```
350389

@@ -382,6 +421,21 @@ void foo() {
382421
} // foo
383422
```
384423

424+
### DefaultArguments
425+
{:.v20}
426+
427+
A boolean that enables/disables inlay hints for default arguments. Example:
428+
429+
```c++
430+
void foo(int a, int b = 42);
431+
void bar() {
432+
// This line will be displayed as `foo(a: 41, b: 42);`
433+
// The `a:` is the usual parameter hint.
434+
// The `, b: 42` is a default argument hint.
435+
foo(41);
436+
}
437+
```
438+
385439
### TypeNameLimit
386440
{:.v17}
387441

styles.css

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,8 @@ a[href^="https://code.woboq.org/"] {
169169

170170
/* Version marker ornaments */
171171
.v6::before, .v7::before, .v8::before, .v9::before, .v10::before, .v11::before, .v12::before,
172-
.v13::before, .v14::before, .v15::before, .v16::before, .v17::before, .v18::before, .v19::before {
172+
.v13::before, .v14::before, .v15::before, .v16::before, .v17::before, .v18::before, .v19::before,
173+
.v20::before {
173174
color: #008;
174175
border-radius: 3px;
175176
padding: 0.2em 0.6em;
@@ -195,6 +196,7 @@ a[href^="https://code.woboq.org/"] {
195196
.v17::before { content: "clangd-17"; }
196197
.v18::before { content: "clangd-18"; }
197198
.v19::before { content: "clangd-19"; }
199+
.v20::before { content: "clangd-20"; }
198200
#edit {
199201
text-decoration: none;
200202
position: absolute;

0 commit comments

Comments
 (0)