about summary refs log tree commit diff
path: root/pkgs/aszlig/vim/default.nix
diff options
context:
space:
mode:
authoraszlig <aszlig@nix.build>2019-08-03 03:22:02 +0200
committeraszlig <aszlig@nix.build>2019-08-03 03:55:53 +0200
commit65adece0353894df7450a86c60c7936a31ba7fb8 (patch)
tree08704285c0d30e32f14b381d200e251e78fe61b0 /pkgs/aszlig/vim/default.nix
parentec53eacbd49399c254ee5e2d2a3d94f58f36a551 (diff)
vim: Add syntax highlighting for Xdebug traces
Unfortunately these days I have to debug a lot of PHP code, so having
syntax highlighting (even though the syntax file is pretty terse) and
being able to fold Xdebug traces is quite useful to have.

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, 13 insertions, 0 deletions
diff --git a/pkgs/aszlig/vim/default.nix b/pkgs/aszlig/vim/default.nix
index 00906802..ddad7979 100644
--- a/pkgs/aszlig/vim/default.nix
+++ b/pkgs/aszlig/vim/default.nix
@@ -344,6 +344,18 @@ let
         install -vD -m 0644 ext/Vim/jinja.vim "$out/syntax/jinja.vim"
       '';
     };
+
+    xdebug = fetchurl {
+      name = "vim-xt-syntax";
+      url = "https://raw.githubusercontent.com/xdebug/xdebug/"
+          + "ce4f6bc7ae04ae542960af6c1b8975888e9c3e5e/contrib/xt.vim";
+      sha256 = "05a3nry310s2w1h2q7w6yw2wick81jrnrs43x9vk0k7dqyavhvhi";
+      downloadToTemp = true;
+      recursiveHash = true;
+      postFetch = ''
+        install -vD -m 0644 "$downloadedFile" "$out/syntax/xt.vim"
+      '';
+    };
   };
 
   generic = ''
@@ -410,6 +422,7 @@ let
     " filetype defaults
     au BufNewFile,BufRead *.as setlocal ft=actionscript
     au BufNewFile,BufRead *.tt setlocal ft=tt2html ts=2 sw=2 sts=2 et
+    au BufNewFile,BufRead *.xt setlocal ft=xt foldlevel=4
     au BufNewFile,BufRead *.html setlocal ts=2 sw=2 sts=2 et
     au FileType python setlocal textwidth=79
     au FileType gitcommit setlocal textwidth=72