HighCommander4 wrote:
> I'm planning to revise the patch to make the following changes:
>
>1. Put the new behaviour behind a config option (I'm thinking `Hover` -->
> `ShowFields`)
>2. Add C language mode tests
>3. Use `PrintingCallbacks` instead of a `PrintingPolicy` flag
These
https://github.com/HighCommander4 ready_for_review
https://github.com/llvm/llvm-project/pull/89557
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/HighCommander4 updated
https://github.com/llvm/llvm-project/pull/89557
>From fcb2ac4c68554d9c708b3db779b5570ff94725e8 Mon Sep 17 00:00:00 2001
From: Nathan Ridge
Date: Sun, 21 Apr 2024 20:30:16 -0400
Subject: [PATCH] [clangd] Show struct fields and enum members in hovers
https://github.com/HighCommander4 converted_to_draft
https://github.com/llvm/llvm-project/pull/89557
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
HighCommander4 wrote:
I'm planning to revise the patch to make the following changes:
1. Put the new behaviour behind a config option (I'm thinking `Hover` -->
`ShowFields`)
2. Add C language mode tests
3. Use `PrintingCallbacks` instead of a `PrintingPolicy` flag
HighCommander4 wrote:
> I have a few questions:
>
>1. Do we want an RFC in discourse for the changes in `DeclPrinter`?
An RFC might be overkill, but asking for review from a clang code owner for
changes to an interface such as `PrintingPolicy` or `PrintingCallbacks` is
probably a good
HighCommander4 wrote:
> > 3. Regarding the implementation approach, is it fine to add a flag to
> > `PrintingPolicy` (which is a clang utility class used in a variety of
> > places) for a clangd-specific use case like this? I did it this way because
> > the alternative seemed to involve
@@ -474,6 +477,17 @@ void DeclPrinter::VisitDeclContext(DeclContext *DC, bool
Indent) {
for (DeclContext::decl_iterator D = DC->decls_begin(), DEnd =
DC->decls_end();
D != DEnd; ++D) {
+// Print enum members and public struct fields when
+//
colin-grant-work wrote:
> As not all editors let you interact with hover cards, and just seeing a bunch
> of field names, without any extra info, sounds suboptimal to me... I'd like
> to have a way for such people to keep using hover cards without definition
> eating up the whole screen
HighCommander4 wrote:
> what about showing this kind of "summary" only when hovering over the
> declaration of the symbol, rather than references?
Did you mean the other way around (references and not declaration, since when
you're at the declaration you're likely already looking at the
kadircet wrote:
So my 2cents;
> 1. I know a [previous comment on the
> bug](https://github.com/clangd/clangd/issues/959#issuecomment-998927030)
> stated "We don't show bodies of classes/enums/functions etc by policy", but
> can we consider changing this policy in the more limited case of
https://github.com/zyn0217 commented:
Thank you! I have a few questions:
1) Do we want an RFC in discourse for the changes in `DeclPrinter`?
2) Do you think we should also add some test cases to `DeclPrinterTest.cpp`?
https://github.com/llvm/llvm-project/pull/89557
@@ -474,6 +477,17 @@ void DeclPrinter::VisitDeclContext(DeclContext *DC, bool
Indent) {
for (DeclContext::decl_iterator D = DC->decls_begin(), DEnd =
DC->decls_end();
D != DEnd; ++D) {
+// Print enum members and public struct fields when
+//
@@ -474,6 +477,17 @@ void DeclPrinter::VisitDeclContext(DeclContext *DC, bool
Indent) {
for (DeclContext::decl_iterator D = DC->decls_begin(), DEnd =
DC->decls_end();
D != DEnd; ++D) {
+// Print enum members and public struct fields when
+//
https://github.com/zyn0217 edited
https://github.com/llvm/llvm-project/pull/89557
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
HighCommander4 wrote:
A few things I would appreciate feedback on:
1. I know a [previous comment on the
bug](https://github.com/clangd/clangd/issues/959#issuecomment-998927030) stated
"We don't show bodies of classes/enums/functions etc by policy", but can we
consider changing this policy
llvmbot wrote:
@llvm/pr-subscribers-clangd
Author: Nathan Ridge (HighCommander4)
Changes
Fixes https://github.com/clangd/clangd/issues/959
---
Full diff: https://github.com/llvm/llvm-project/pull/89557.diff
4 Files Affected:
- (modified) clang-tools-extra/clangd/Hover.cpp (+2)
-
https://github.com/HighCommander4 ready_for_review
https://github.com/llvm/llvm-project/pull/89557
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/HighCommander4 created
https://github.com/llvm/llvm-project/pull/89557
Fixes https://github.com/clangd/clangd/issues/959
>From d98c95bf213f0c6e81a46a9e37d376b855bb4867 Mon Sep 17 00:00:00 2001
From: Nathan Ridge
Date: Sun, 21 Apr 2024 20:30:16 -0400
Subject: [PATCH]
19 matches
Mail list logo