about summary refs log tree commit diff
path: root/pkgs/aszlig/vim/default.nix
diff options
context:
space:
mode:
authoraszlig <aszlig@nix.build>2020-05-08 00:08:37 +0200
committeraszlig <aszlig@nix.build>2020-05-08 00:08:37 +0200
commit82eb432fd599abd47aaa14d55dfb6550ebca3eb4 (patch)
treef2a46044ed347711c678f3a6324ebe62fec7dd83 /pkgs/aszlig/vim/default.nix
parentd28f88d95200ed24379bcbfc4066750c44741f35 (diff)
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 <aszlig@nix.build>
Diffstat (limited to 'pkgs/aszlig/vim/default.nix')
-rw-r--r--pkgs/aszlig/vim/default.nix13
1 files changed, 12 insertions, 1 deletions
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";