summaryrefslogtreecommitdiffstats
path: root/syntax/lidris.vim
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2019-03-04 10:14:37 +0100
committerAdam Stankiewicz <sheerun@sher.pl>2019-03-04 10:14:37 +0100
commit63922a1d1ea22c58be758d188068f33491411c0c (patch)
tree41c1f4b4ee2c35e0d78c59a616cf7423a5a14637 /syntax/lidris.vim
parent0cd0b7f8942a42bf8cb24affb18ac5bedae5aa48 (diff)
downloadvim-polyglot-63922a1d1ea22c58be758d188068f33491411c0c.tar.gz
vim-polyglot-63922a1d1ea22c58be758d188068f33491411c0c.zip
Add idris support, closes #265
Diffstat (limited to 'syntax/lidris.vim')
-rw-r--r--syntax/lidris.vim26
1 files changed, 26 insertions, 0 deletions
diff --git a/syntax/lidris.vim b/syntax/lidris.vim
new file mode 100644
index 00000000..d4e55efb
--- /dev/null
+++ b/syntax/lidris.vim
@@ -0,0 +1,26 @@
+if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'idris') != -1
+ finish
+endif
+
+" Vim syntax file
+" Language: Literate Idris
+" Maintainer: Idris Hackers (https://github.com/idris-hackers/idris-vim)
+" Last Change: 2014 Mar 4
+" Version: 0.1
+"
+" This is just a minimal adaption of the Literate Haskell syntax file.
+
+
+" Read Idris highlighting.
+if version < 600
+ syntax include @idrisTop <sfile>:p:h/idris.vim
+else
+ syntax include @idrisTop syntax/idris.vim
+endif
+
+" Recognize blocks of Bird tracks, highlight as Idris.
+syntax region lidrisBirdTrackBlock start="^>" end="\%(^[^>]\)\@=" contains=@idrisTop,lidrisBirdTrack
+syntax match lidrisBirdTrack "^>" contained
+hi def link lidrisBirdTrack Comment
+
+let b:current_syntax = "lidris"