VSCode + Clangd: type annotations become obtrusive - how to disable?

Viewed 1769

I'm using VSCode 1.65.0, the clangd extension, and clangd from latest LLVM (14.0).

It seems to have introduced a feature where it displays type-hints whenever I use auto. Here is an example: clangd type-hints

This is becoming very obtrusive to me. How can this be turned off? I couldn't find documentation about this feature.

Thanks.

2 Answers

In the meanwhile I discovered you can create a file called .clangd, and add this:

InlayHints:
  Enabled: Yes
  ParameterNames: Yes
  DeducedTypes: No

You can go to the command palette (⇧⌘P) and start typing clangd: Toggle inlay hints to turn this feature on/off.

Related