[PATCH] D108584: [clangd] Use the active file's language for hover code blocks
David Goldman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 24 07:42:35 PDT 2021
dgoldman added a comment.
In D108584#2962271 <https://reviews.llvm.org/D108584#2962271>, @sammccall wrote:
>> Likely will send a follow up diff to include more context in the Objective-C decl printing so they highlight properly.
>
> This might make sense if it provides useful context to human readers without too much syntactic weight.
> However if the issue is that particular editors are mis-highlighting snippets of ObjC, that's probably rather bugs to file against those editors (or maybe reasons to drop the language and fall back to regular highlighting)
Right, we're just missing the decl context (since objc decls must be in a top level container)
e.g. currently we have:
// In AppDelegate()
@property(nonatomic, assign, unsafe_unretained, readwrite) NSInteger version;
instead we could show
@interface AppDelegate()
@property(nonatomic, assign, unsafe_unretained, readwrite) NSInteger version;
@end
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108584/new/
https://reviews.llvm.org/D108584
More information about the cfe-commits
mailing list