mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-08 11:33:52 -05:00
34 lines
1017 B
VimL
34 lines
1017 B
VimL
let s:base = expand("<sfile>:h:h")
|
|
let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" }
|
|
let files = filter(globpath(&rtp, 'syntax/lidris.vim', 1, 1), Filter)
|
|
if len(files) > 0
|
|
exec 'source ' . files[0]
|
|
finish
|
|
endif
|
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'idris') == -1
|
|
|
|
" 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"
|
|
|
|
endif
|