From 03c5372a947d522ea2d3ebb1c4e01f8cc99e3b15 Mon Sep 17 00:00:00 2001 From: aszlig Date: Tue, 23 Aug 2022 13:29:48 +0200 Subject: 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 --- pkgs/aszlig/vim/default.nix | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'pkgs/aszlig') 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') -- cgit 1.4.1