feat(cheddar): Override syntax highlighting for 'rules.pl' to Prolog
Adds a mechanism for per-filename overrides of the chosen language syntax and configures it for Gerrit's submit rule file. This also switches the syntax set used to the one from //third_party/bat_syntaxes, which contains custom additions such as Prolog support. Change-Id: I2023dbad5b326305ef2ef0ecf34ef66a3f7575ab Reviewed-on: https://cl.tvl.fyi/c/depot/+/349 Reviewed-by: riking <rikingcoding@gmail.com> Reviewed-by: lukegb <lukegb@tvl.fyi>
This commit is contained in:
parent
0b95b8632d
commit
9885b70b7a
2 changed files with 34 additions and 17 deletions
|
|
@ -1,20 +1,17 @@
|
|||
{ depot, ... }:
|
||||
{ pkgs, ... }:
|
||||
|
||||
with depot.third_party;
|
||||
|
||||
naersk.buildPackage {
|
||||
pkgs.naersk.buildPackage {
|
||||
src = ./.;
|
||||
doDoc = false;
|
||||
doCheck = false;
|
||||
|
||||
override = x: {
|
||||
# bat contains syntax highlighting packages for a lot more
|
||||
# languages than what ships with syntect, and we can make use of
|
||||
# them!
|
||||
BAT_SYNTAXES = "${bat.src}/assets/syntaxes.bin";
|
||||
# Use our custom bat syntax set, which is everything from upstream,
|
||||
# plus additional languages we care about.
|
||||
BAT_SYNTAXES = "${pkgs.bat_syntaxes}";
|
||||
|
||||
# LLVM packages (why are they even required?) are not found
|
||||
# automatically if added to buildInputs, hence this ...
|
||||
LIBCLANG_PATH = "${llvmPackages.libclang}/lib/libclang.so.10";
|
||||
LIBCLANG_PATH = "${pkgs.llvmPackages.libclang}/lib/libclang.so.10";
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue