summaryrefslogtreecommitdiffstats
path: root/tv/5pkgs/vim/tv.nix
diff options
context:
space:
mode:
authorjeschli <jeschli@gmail.com>2019-06-25 22:43:02 +0200
committerjeschli <jeschli@gmail.com>2019-06-25 22:43:02 +0200
commit1cfc265bbfa14b7d9fc6479bcd9cf541e7cdd5eb (patch)
tree18b95faba964f8072d23afcadcadda4f3eb276af /tv/5pkgs/vim/tv.nix
parent8079877eee34d0a658e8419adfa8987e648388a8 (diff)
parent1d23dceb5d2c536790a00fcde30743b958f1018f (diff)
Merge branch 'master' of prism.r:stockholm
Diffstat (limited to 'tv/5pkgs/vim/tv.nix')
-rw-r--r--tv/5pkgs/vim/tv.nix53
1 files changed, 53 insertions, 0 deletions
diff --git a/tv/5pkgs/vim/tv.nix b/tv/5pkgs/vim/tv.nix
new file mode 100644
index 00000000..ae6245b8
--- /dev/null
+++ b/tv/5pkgs/vim/tv.nix
@@ -0,0 +1,53 @@
+{ pkgs }:
+
+(rtp: rtp // { inherit rtp; }) (pkgs.write "vim-tv" {
+ #
+ # Haskell
+ #
+ "/ftplugin/haskell.vim".text = ''
+ if exists("g:vim_tv_ftplugin_haskell_loaded")
+ finish
+ endif
+ let g:vim_tv_ftplugin_haskell_loaded = 1
+
+ setlocal iskeyword+='
+ '';
+ #
+ # TODO
+ #
+ "/ftdetect/todo.vim".text = ''
+ au BufRead,BufNewFile TODO set ft=todo
+ '';
+ "/ftplugin/todo.vim".text = ''
+ setlocal foldmethod=syntax
+ '';
+ "/syntax/todo.vim".text = ''
+ syn match todoComment /#.*/
+
+ syn match todoDate /^[1-9]\S*/
+ \ nextgroup=todoSummary
+
+ syn region todoSummary
+ \ contained
+ \ contains=todoTag
+ \ start="." end="$\n"
+ \ nextgroup=todoBlock
+
+ syn match todoTag /\[[A-Za-z]\+\]/hs=s+1,he=e-1
+ \ contained
+
+ syn region todoBlock
+ \ contained
+ \ contains=Comment
+ \ fold
+ \ start="^[^1-9]" end="^[1-9 ]"re=s-1,he=s-1,me=s-1
+
+ syn sync minlines=1000
+
+ hi link todoComment Comment
+ hi todoDate ctermfg=255
+ hi todoSummary ctermfg=229
+ hi todoBlock ctermfg=248
+ hi todoTag ctermfg=217
+ '';
+})