[PATCH] D66990: [clangd] Add distinct highlightings for declarations of functions and methods
Ilya Biryukov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 2 01:41:49 PDT 2019
ilya-biryukov added a comment.
In D66990#1653833 <https://reviews.llvm.org/D66990#1653833>, @nridge wrote:
> I think it makes sense to style function declarations differently from function uses for emphasis. For example, you can use the same color for both, but make the declarations bold. I have found this to aid readability.
I think this makes sense, but it should be done for **all** declarations and not just functions.
But doing that in the current design would mean we need to double the number of styles. In addition to `field`, `method`, `function`, we would need `field-declaration`, `method-declaration`, `function-declaration`, etc.
Combinatorial explosion of that kind is bad, so I would rather avoid it.
That would also mean we would rely on every editor to apply consistent styling for this, at least by default: make `somethind-decl` just like `decl` but bold.
I don't think there's any way to enforce this.
If there was an alternative design we could use for this that would not cause combinatorial explosion and would allow us to consistently apply the same modifier to different kinds of highlighting (e.g. something that will **consistently** turn to bold in all editors that support this), I would be supportive of implementing this.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66990/new/
https://reviews.llvm.org/D66990
More information about the cfe-commits
mailing list