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/help.vim | 40 ++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .vim/autoload/neomake/makers/ft/help.vim (limited to '.vim/autoload/neomake/makers/ft/help.vim') diff --git a/.vim/autoload/neomake/makers/ft/help.vim b/.vim/autoload/neomake/makers/ft/help.vim new file mode 100644 index 0000000..c573cef --- /dev/null +++ b/.vim/autoload/neomake/makers/ft/help.vim @@ -0,0 +1,40 @@ +let s:makers = ['writegood'] + +let s:slash = neomake#utils#Slash() +let s:vimhelplint_exe = '' +if executable('vimhelplint') + let s:vimhelplint_exe = 'vimhelplint' +else + let s:neomake_root = expand(':p:h:h:h:h:h', 1) + if !empty(glob(join([s:neomake_root, 'build', 'vimhelplint'], s:slash))) + let s:vimhelplint_exe = join([s:neomake_root, 'contrib', 'vimhelplint'], s:slash) + endif +endif +if !empty(s:vimhelplint_exe) + let s:makers += ['vimhelplint'] +endif + +function! neomake#makers#ft#help#EnabledMakers() abort + return s:makers +endfunction + +function! neomake#makers#ft#help#vimhelplint() abort + " NOTE: does not support/uses arg from wrapper script (i.e. no support for + " tempfiles). It will use the arg only to expand/glob `*.txt` + " (which does not include the hidden tempfile). + return { + \ 'exe': s:vimhelplint_exe, + \ 'errorformat': '%f:%l:%c:%trror:%n:%m,%f:%l:%c:%tarning:%n:%m', + \ 'postprocess': function('neomake#postprocess#generic_length'), + \ 'output_stream': 'stdout', + \ } +endfunction + +function! neomake#makers#ft#help#proselint() abort + return neomake#makers#ft#text#proselint() +endfunction + +function! neomake#makers#ft#help#writegood() abort + return neomake#makers#ft#text#writegood() +endfunction +" vim: ts=4 sw=4 et -- cgit v1.2.3