diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 1c7828a..b719e01 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -234,7 +234,18 @@ let g:syntastic_auto_loc_list = 1 let g:syntastic_check_on_open = 1 let g:syntastic_check_on_wq = 0 -nnoremap y :SyntasticToggleMode +function ToggleSyntastic() + if !exists('b:syntastic_mode') || b:syntastic_mode == 'active' + let b:syntastic_mode = 'passive' + exec 'SyntasticReset' + else + let b:syntastic_mode = 'active' + exec 'SyntasticCheck' + end + +endfunction + +nnoremap y :call ToggleSyntastic() " Tagbar let g:tagbar_type_go = {