aboutsummaryrefslogtreecommitdiff
path: root/.vim/autoload/neomake/setup.vim
diff options
context:
space:
mode:
authorYaroslav <contact@yaroslavps.com>2019-09-05 19:35:38 +0300
committerYaroslav <contact@yaroslavps.com>2019-09-05 19:35:38 +0300
commit212dcd0bf753f08c0127a26a71b673c734b45c02 (patch)
tree4a43e43c7c9b9ccfcaef4088ba9e5f52154994b5 /.vim/autoload/neomake/setup.vim
downloadvimrice-212dcd0bf753f08c0127a26a71b673c734b45c02.tar.gz
vimrice-212dcd0bf753f08c0127a26a71b673c734b45c02.zip
init commit, extracted vim config from i3rice
Diffstat (limited to '.vim/autoload/neomake/setup.vim')
-rw-r--r--.vim/autoload/neomake/setup.vim37
1 files changed, 37 insertions, 0 deletions
diff --git a/.vim/autoload/neomake/setup.vim b/.vim/autoload/neomake/setup.vim
new file mode 100644
index 0000000..e0c5298
--- /dev/null
+++ b/.vim/autoload/neomake/setup.vim
@@ -0,0 +1,37 @@
+if has('signs')
+ let g:neomake_place_signs = get(g:, 'neomake_place_signs', 1)
+else
+ let g:neomake_place_signs = 0
+ lockvar g:neomake_place_signs
+endif
+
+function! neomake#setup#define_highlights() abort
+ if g:neomake_place_signs
+ call neomake#signs#DefineHighlights()
+ endif
+ if get(g:, 'neomake_highlight_columns', 1)
+ \ || get(g:, 'neomake_highlight_lines', 0)
+ call neomake#highlights#DefineHighlights()
+ endif
+endfunction
+
+function! neomake#setup#setup_autocmds() abort
+ augroup neomake
+ au!
+ if !exists('*nvim_buf_add_highlight')
+ autocmd BufEnter * call neomake#highlights#ShowHighlights()
+ endif
+ if has('timers')
+ autocmd CursorMoved * call neomake#CursorMovedDelayed()
+ " Force-redraw display of current error after resizing Vim, which appears
+ " to clear the previously echoed error.
+ autocmd VimResized * call timer_start(100, function('neomake#EchoCurrentError'))
+ else
+ autocmd CursorHold,CursorHoldI * call neomake#CursorMoved()
+ endif
+ autocmd VimLeave * call neomake#VimLeave()
+ autocmd ColorScheme * call neomake#setup#define_highlights()
+ augroup END
+endfunction
+
+" vim: ts=4 sw=4 et