about summary refs log tree commit diff
path: root/pkgs/aszlig
diff options
context:
space:
mode:
authoraszlig <aszlig@nix.build>2022-08-23 13:29:48 +0200
committeraszlig <aszlig@nix.build>2022-08-23 13:35:36 +0200
commit03c5372a947d522ea2d3ebb1c4e01f8cc99e3b15 (patch)
treeff562c9a13cc1458782f2881a410de09b7fef577 /pkgs/aszlig
parent14b739010a614507c5c460df4e32b917a0e94559 (diff)
pkgs/vim: Remove hex and color names highlighting
We only want to highlight #aabbcc-style hex colors and not every damn
hex value that happens to be 3 or 4 bytes, which is very annoying when
you're doing a lot of bit manipulation.

Additionally, I currently have a code base where "gold" is something a
player can have, so one doesn't need much imagination on how irritating
that is.

Signed-off-by: aszlig <aszlig@nix.build>
Diffstat (limited to 'pkgs/aszlig')
-rw-r--r--pkgs/aszlig/vim/default.nix5
1 files changed, 5 insertions, 0 deletions
diff --git a/pkgs/aszlig/vim/default.nix b/pkgs/aszlig/vim/default.nix
index 2a8ca5cb..bfcb5818 100644
--- a/pkgs/aszlig/vim/default.nix
+++ b/pkgs/aszlig/vim/default.nix
@@ -376,6 +376,9 @@ let
         fetchSubmodules = true;
       };
       postPatch = ''
+        # We don't want to highlight 0xaabbcc, only #aabbcc.
+        sed -i -e 's/|0x)/)/g' hexokinase/hex.go
+
         sed -i -n -e '/^let g:Hexokinase_executable_path/ {
           :l; n; /^ *\\/bl
           i let g:Hexokinase_executable_path = '"'$bin/bin/hexokinase'"'
@@ -587,6 +590,8 @@ let
     let g:Hexokinase_highlighters = ['background']
     let g:Hexokinase_refreshEvents =
       \ ['TextChanged', 'TextChangedI', 'InsertLeave', 'BufRead']
+    let g:Hexokinase_optInPatterns =
+      \ ['full_hex', 'rgb', 'rgba', 'hsl', 'hsla']
 
     " rust
     if !executable('rustc')