[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 20 08:04:37 PDT 2023
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>
Message-ID:
In-Reply-To: <llvm/llvm-project/pull/66514/clang at github.com>
cor3ntin wrote:
> This is a really great idea! I like the direction this is going! I think we need to find some way to get the source colors/have them be configurable. Is there some sort of 'source' of terminal coloring that we could use? Or a theme of some sort?
> At minimum, we need to let these colors be configurable in some way. Is there some sort of prior art in another tool we can copy from?
Most terminal will let you remap the color escape sequences to something else, IE "white" might become black in a dark theme. Nothing per-application.
Trying to come up with a way to do that in clang does seems out of scope to me. After all we don't do it for warning.
it would be hilarious if we did do support one of the scheme that exist for IDE configurations though. But if we were motivated enough to do that we should also do it for existing colors (ie, warning, etc).
> Additionally, this needs to be disabled/disable-able via a command line switch eventually (as we do for our other coloring). It should perhaps be a separate disable switch from how we highlight 'error' or 'warning', but enabled at the same time?
Agreed
> WDYT?
https://github.com/llvm/llvm-project/pull/66514
More information about the cfe-commits
mailing list