[PATCH] D116786: [clangd] Add designator inlay hints for initializer lists.

2022-01-25 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGce94432702bf: [clangd] Add designator inlay hints for initializer lists. (authored by sammccall). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116786/new/

[PATCH] D116786: [clangd] Add designator inlay hints for initializer lists.

2022-01-24 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. > Agree. I guess then we ignore the issue for this patch? As you say that's > affects other hints too, and a mitigation (hopefully) won't be specific to > the kind of hint. Yup. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D116786: [clangd] Add designator inlay hints for initializer lists.

2022-01-23 Thread Nathan Ridge via Phabricator via cfe-commits
nridge accepted this revision. nridge added a comment. This revision is now accepted and ready to land. Thanks, I'm happy to try the array designators and see how they work out in practice. The issue of hints appearing and disappearing as you type a function call is one I've noticed, but I've

[PATCH] D116786: [clangd] Add designator inlay hints for initializer lists.

2022-01-21 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In D116786#3260970 , @kadircet wrote: > I feel like this is the way to go, but we'll need to put more thought into > the design Agree. I guess then we ignore the issue for this patch? As you say that's affects other hints

[PATCH] D116786: [clangd] Add designator inlay hints for initializer lists.

2022-01-21 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. I was also thinking about a cache-based solution in which we can update results as we please, and as you noted the idea definitely generalizes to other requests as well, with possibly little nuances around the definition of "as we please", which makes things a lot

[PATCH] D116786: [clangd] Add designator inlay hints for initializer lists.

2022-01-20 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In D116786#3257932 , @kadircet wrote: >> Any ideas? :-( > > I've got a feeling that, this should also be annoying in the case of function > calls (especially when there's only one overload)? Maybe we should just > debounce

[PATCH] D116786: [clangd] Add designator inlay hints for initializer lists.

2022-01-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. > Any ideas? :-( I've got a feeling that, this should also be annoying in the case of function calls (especially when there's only one overload)? Maybe we should just debounce the inlayhint requests (by saying contents modified to the clients)? Repository: rG LLVM

[PATCH] D116786: [clangd] Add designator inlay hints for initializer lists.

2022-01-19 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In D116786#3247800 , @kadircet wrote: > a drive by concern around possible flakiness of the interaction. have you > checked how does it look like when the user is still forming the initializer? > it might be annoying if their

[PATCH] D116786: [clangd] Add designator inlay hints for initializer lists.

2022-01-19 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 401410. sammccall marked 8 inline comments as done. sammccall added a comment. Address comments, rebase. This category is *off* by default. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116786/new/

[PATCH] D116786: [clangd] Add designator inlay hints for initializer lists.

2022-01-17 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. a drive by concern around possible flakiness of the interaction. have you checked how does it look like when the user is still forming the initializer? it might be annoying if their cursor kept jumping around while they're editing the (possibly half-formed)

[PATCH] D116786: [clangd] Add designator inlay hints for initializer lists.

2022-01-16 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. Thanks, this is a pretty nice addition! My only piece of high-level feedback is probing if the array element designators (`[0]=`) are useful enough to be worth the space/noise. The rest is minor implementation comments. Comment at:

[PATCH] D116786: [clangd] Add designator inlay hints for initializer lists.

2022-01-06 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. (I know you're on vacation, this isn't urgent, just wanted to send it so I didn't lose it to git obscurity!) Comment at: clang-tools-extra/clangd/InlayHints.cpp:400 return false; -// Allow whitespace and "=" at end of comment. -

[PATCH] D116786: [clangd] Add designator inlay hints for initializer lists.

2022-01-06 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: nridge. Herald added subscribers: usaxena95, kadircet, arphaman. sammccall requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. These make the init