summaryrefslogtreecommitdiffstats
path: root/tv
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2019-02-02 21:21:48 +0100
committertv <tv@krebsco.de>2019-02-02 21:21:48 +0100
commit4961c28dae4e7b3903fb6b0792960dc4f82ae24c (patch)
tree77fe6bc7973193104a088041b689b582eb5425a6 /tv
parent9335c2616a01d3d6e21288d79bd64024578e3c38 (diff)
tv vim: add TODO ft
Diffstat (limited to 'tv')
-rw-r--r--tv/2configs/vim.nix37
1 files changed, 37 insertions, 0 deletions
diff --git a/tv/2configs/vim.nix b/tv/2configs/vim.nix
index fe1482817..de843a30f 100644
--- a/tv/2configs/vim.nix
+++ b/tv/2configs/vim.nix
@@ -141,6 +141,43 @@ let {
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 Comment /#.*/
+
+ syn match todoDate /^[1-9]\S*/
+ \ nextgroup=todoSummary
+
+ syn region todoSummary
+ \ contained
+ \ contains=todoTag
+ \ start="." end="$\n"
+ \ nextgroup=todoBlock
+
+ syn match todoTag /\[[a-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 todoDate ctermfg=255
+ hi todoSummary ctermfg=229
+ hi todoBlock ctermfg=248
+ hi todoTag ctermfg=217
+ '';
}))
((rtp: rtp // { inherit rtp; }) (pkgs.write "vim-syntax-nix-nested" {
"/syntax/haskell.vim".text = ''