From 212dcd0bf753f08c0127a26a71b673c734b45c02 Mon Sep 17 00:00:00 2001 From: Yaroslav Date: Thu, 5 Sep 2019 19:35:38 +0300 Subject: init commit, extracted vim config from i3rice --- .vim/autoload/neomake/makers/ft/idris.vim | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .vim/autoload/neomake/makers/ft/idris.vim (limited to '.vim/autoload/neomake/makers/ft/idris.vim') diff --git a/.vim/autoload/neomake/makers/ft/idris.vim b/.vim/autoload/neomake/makers/ft/idris.vim new file mode 100644 index 0000000..5d95edb --- /dev/null +++ b/.vim/autoload/neomake/makers/ft/idris.vim @@ -0,0 +1,25 @@ +function! neomake#makers#ft#idris#EnabledMakers() abort + return ['idris'] +endfunction + +function! neomake#makers#ft#idris#Postprocess(entry) abort + call neomake#postprocess#compress_whitespace(a:entry) + " Extract length from the beginning of the entry ('-4:When checking left hand side of xor:'). + if a:entry.text =~# '\v^\d+:' + let end = 0 + a:entry.text " cast to int + let a:entry.length = end - a:entry.col + let a:entry.text = substitute(a:entry.text, '\v^([^:]+:){2} ', '', '') + endif +endfunction + +function! neomake#makers#ft#idris#idris() abort + return { + \ 'exe': 'idris', + \ 'args': ['--check', '--warn', '--total', '--warnpartial', '--warnreach'], + \ 'errorformat': + \ '%E%f:%l:%c:%.%#,%-C %#%m,%-C%.%#,'. + \ '%E%f:%l:%c-%m,%-C %#%m,%-C%.%#', + \ 'postprocess': function('neomake#makers#ft#idris#Postprocess'), + \ } +endfunction +" vim: ts=4 sw=4 et -- cgit v1.2.3