summaryrefslogtreecommitdiffstats
path: root/pkgs/vim/vim.nix
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2023-09-11 18:24:28 +0200
committertv <tv@krebsco.de>2023-09-13 18:07:11 +0200
commit0c4f3acb281be6290c55a6e96bc29fab5b5c7a11 (patch)
treedadaec00477a095273475ac345b2066b4748c399 /pkgs/vim/vim.nix
parentab1d0479e90f11806d4703ec6fffed3d5f782914 (diff)
stockholm -> hrm
Diffstat (limited to 'pkgs/vim/vim.nix')
-rw-r--r--pkgs/vim/vim.nix21
1 files changed, 21 insertions, 0 deletions
diff --git a/pkgs/vim/vim.nix b/pkgs/vim/vim.nix
new file mode 100644
index 0000000..e026f13
--- /dev/null
+++ b/pkgs/vim/vim.nix
@@ -0,0 +1,21 @@
+{ lib, pkgs }:
+
+let
+ mylib = import ../../lib/pure.nix {
+ inherit lib;
+ };
+in
+
+pkgs.tv.vim.makePlugin (pkgs.writeTextFile (let
+ name = "vim";
+in {
+ name = "vim-syntax-${name}-1.0.0";
+ destination = "/syntax/${name}.vim";
+ text = /* vim */ ''
+ ${lib.concatMapStringsSep "\n" (s: /* vim */ ''
+ syn keyword vimColor${s} ${s}
+ \ containedin=ALLBUT,vimComment,vimLineComment
+ hi vimColor${s} ctermfg=${s}
+ '') (map (i: mylib.lpad 3 "0" (toString i)) (lib.range 0 255))}
+ '';
+}))