From 82eb432fd599abd47aaa14d55dfb6550ebca3eb4 Mon Sep 17 00:00:00 2001 From: aszlig Date: Fri, 8 May 2020 00:08:37 +0200 Subject: vim: Add vim-css-color plugin This is quite useful in CSS files and others to directly highlight the colours in the actual colour value rather than with the generic colour of the syntax file. To make sure we don't break the after/syntax files for Haskell and HTML, I also changed the way we install those files in the output directory so that if a file already exists, it is appended to rather than overwritten. Signed-off-by: aszlig --- pkgs/aszlig/vim/default.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'pkgs/aszlig') diff --git a/pkgs/aszlig/vim/default.nix b/pkgs/aszlig/vim/default.nix index 0f97b293..d48e5435 100644 --- a/pkgs/aszlig/vim/default.nix +++ b/pkgs/aszlig/vim/default.nix @@ -364,6 +364,13 @@ let rev = "67ca4dc4a0291e5d8c8da48bffc0f3d2c9739e7f"; sha256 = "1insh39hzbynr6qxb215qxhpifl5m8i5i0d09a3b6v679i7s11i8"; }; + + vim-css-color = fetchFromGitHub { + owner = "ap"; + repo = "vim-css-color"; + rev = "741dd18a35e251ededc0687eea9b8d100d3b83b8"; + sha256 = "1mjwyznprhhfmwi1djyjgxkqv9bwima1ysxa9782rk198j2n87vs"; + }; }; generic = '' @@ -497,7 +504,11 @@ let installPlugin = name: plugin: let mkInst = targetDir: writeScript "install-plugin-file" '' #!${stdenv.shell} - exec install -m 0644 -vD "$1" "${targetDir}/$1" + if [ -e "${targetDir}/$1" ]; then + cat "$1" >> "${targetDir}/$1" + else + exec install -m 0644 -vD "$1" "${targetDir}/$1" + fi ''; afterPath = "$out/share/vim/vimfiles"; -- cgit 1.4.1