================
@@ -22,10 +22,16 @@ namespace clang {
namespace clangd {
class ParsedAST;
+struct InlayHintOptions {
+ // Minimum lines for BlockEnd inlay-hints to be shown
+ int HintMinLineLimit{2};
----------------
HighCommander4 wrote:
What we discussed in the original issue was that the default should remain 2
**for tests**, so that we don't have to change a lot of tests / artificially
make the blocks long in test code, but that the limit used in production should
be increased to 10.
That requires either:
* passing an options struct with the limit set to 10 in the [production call
site](https://searchfox.org/llvm/rev/bb21a6819b3fb9d689de776f7ee768030dfbacea/clang-tools-extra/clangd/ClangdServer.cpp#921);
or
* setting the default to 10 here and adjusting test code accordingly (i.e.
explicitly passing `2` to `DefaultInlayHintOpts`)
My preference is the latter, as that ensures that any new call sites use the
production value by default (and it seems to be what we do for other options).
(Also, small code style nit: the convention in clangd code seems to be [equals
initialization](https://searchfox.org/llvm/rev/bb21a6819b3fb9d689de776f7ee768030dfbacea/clang-tools-extra/clangd/CodeComplete.h#50)
for members.)
https://github.com/llvm/llvm-project/pull/136106
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits