Replies: 7 comments 3 replies
-
Hi, thanks for asking and sorry if this was an unexpected surprise! Yes, our plan is to turn this on by default on the server for clangd 14, and the release process will start in a few weeks. If you have feedback on why you'd rather not have the feature enabled, we'd appreciate it - maybe we can use it to make it more useful/less annoying, or maybe we should reconsider making it default. It's hard to get feedback on this stuff before releasing the feature! Sorry to be extra annoying but we actually plan to drop the
|
Beta Was this translation helpful? Give feedback.
-
A client might provide the option for displaying inlay hints or not, regardless whether the feature is hard-coded on the server. coc-clangd has this option for example. Another option that it provides is to set the separator character, but sadly, this client separator seems to be added on top of the server's hard-coded one ( cc @fannheyward. |
Beta Was this translation helpful? Give feedback.
-
Scratch that, it seems |
Beta Was this translation helpful? Give feedback.
-
IMHO, current default state of inlay hints isn't great, as in real code it's often mostly duplicating what's in the code already, and adding labels on top ( |
Beta Was this translation helpful? Give feedback.
-
@HighCommander4 it's how clangd's inlay hints are visualized, through the editor (nvim + coc.nvim + coc-clangd). |
Beta Was this translation helpful? Give feedback.
-
TBH, I'm not sure how implementation is behaving, coc-rust-analyzer has more sane presentation, coc-clangd not so much, but I can't state with confidence whether that's due to clangd inlay hints data or how coc-clangd presents that. Vim and NeoVim have a limitation regarding inserting inlay hints inside the code, it can only present them besides, so, that code duplication for purposes of pointing what's being labeled might be solely a client issue/limitation. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the question, now I see, this bad experience must all be due to this editor limitation. Thinking how VSCode works (I don't have it installed, but I know how hints are implemented with tiny text in these editors), it all makes sense now, the presence of |
Beta Was this translation helpful? Give feedback.
-
Hi all,
InlayHints seems to be on by default after llvm/llvm-project@7c19fdd (this line and this line specifically), I wonder if this is intentional?
At first sight, I thought this was some new vscode voodoo😅, but then I figure it could be clangd (it was), which I rebuilt from ToT yesterday. This feature is cool tho, thanks for the effort! It will definitely come in handy someday just not today.
For future reference, I managed to turn it off by adding
--inlay-hints=false
in my vscode settings:Beta Was this translation helpful? Give feedback.
All reactions