Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 367
Rui Oliveira Avatar asked Sep 06 '25 13:09

Rui Oliveira


2 Answers

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

like image 109
Marat Khasanov Avatar answered Sep 11 '25 20:09

Marat Khasanov


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

InlayHints:
  Enabled: Yes
  ParameterNames: Yes
  DeducedTypes: No
like image 32
Rui Oliveira Avatar answered Sep 11 '25 22:09

Rui Oliveira