[clangd] Implement end-definition-comment inlay hints
This patch implements a new inlay hint feature proposed in https://github.com/clangd/clangd/issues/1634. It introduces a new inlay hint kind BlockEnd which shows a comment-like hint after a definition brace pair, including function/type/namespace. For example, ``` void foo() { } ^ ``` In the code shown above, a hint should be displayed at ^ labelling `// foo`. Such hint only shows when there's no trailing character after the position except whitespaces and optionally ';'. Also, new configurations are introduced in the inlay hints block ``` InlayHints: BlockEnd: Yes # toggling the feature ``` Reviewed By: sammccall Differential Revision: https://reviews.llvm.org/D150635
Loading
Please sign in to comment