question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add an option to disable inlay hints

See original GitHub issue

Is there a way in settings.json to disable inlay hints added in https://github.com/clangd/vscode-clangd/pull/168?

Turning off editor.inlayHints.enabled doesn’t work for clangd, and I don’t see any specific property.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
HighCommander4commented, Aug 26, 2021

Some background here:

  • The patch to add inlay hint support to the clangd server merged on April 14. At the time, the intention was to enable the feature via a client-side option. (But one specific to clangd, not the built-in editor.inlayHints.enabled; see below for more on that.)
  • During review of the patch adding client-side support, it was decided that the feature should instead be controlled using a command-line option.
  • The client-side patch, together with a server patch to add the --inlay-hint command line option, were merged on May 3.

Now, you happen to be using a pre-release version 13.0.0-4ca0fbfa, which is dated April 24 – happening to fall in between April 14 and May 3 – presumably in combination with a client that’s more recent than May 3. So, yes, in that exact combination, there is no way to disable the hints.

Please bear in mind that pre-release versions do not make stability guarantees, and hiccups like this can sometimes arise and necessitate upgrading to a newer pre-release version (or, in this case, downgrading your client as an alternative).

To answer your final question:

why is editor.inlayHints.enabled ignored?

This option controls vscode’s built-in inlay hints API. Clangd’s implementation predates that and does not use it (it rolls its own with editor decorations). We will switch to the official API in due course (we’re also waiting for the LSP protocol piece to be finalized).

0reactions
magiruuvelvetcommented, Aug 26, 2021

Thanks for the explanation. In the meantime I upgraded my clangd and I can now disable the feature 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Add option to disable inlay hints for functions with only a ...
This issue is caused by an extension, please file it with the repository (or contact) the extension has linked in its overview in...
Read more >
Inlay hints | IntelliJ IDEA Documentation - JetBrains
You can configure inlay hints or toggle them off from the editor: right-click a hint and select Hints Settings. Configure inlay hints ij....
Read more >
VS Code tips — Toggling inlay hints with your keyboard
Quickly toggle inlay hints on/off in VS Code by configuring `editor.inlayHints.enabled`. Setting values:• offUnlessPressed — Hold ctrl+alt ...
Read more >
How to disable Inline hints on VSCode? (Java) [duplicate]
That looks like an inlay hint - in which case try Settings > Editor > inlay Hints. You should see an "Enable/Disable" option....
Read more >
Inlay hints on or off? : r/rust - Reddit
If you need inlay hints to read your own code, then you might need to add some comments or rename some variables.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found