From 145cd08f1eee9380f7a011e4b1edfcb9cece3076 Mon Sep 17 00:00:00 2001 From: Cody Hiar Date: Mon, 22 Jan 2018 16:23:47 -0700 Subject: Adding back in syntastic options --- plugin/vim-options.vim | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) (limited to 'plugin/vim-options.vim') diff --git a/plugin/vim-options.vim b/plugin/vim-options.vim index 73c590b..39fd706 100644 --- a/plugin/vim-options.vim +++ b/plugin/vim-options.vim @@ -235,7 +235,7 @@ endif " Argwrap "----------------------------------------------------------------------------------------------------------------------- if !empty(glob($EditorDir.'plugged/vim-argwrap/plugin/argwrap.vim')) - nnoremap a :ArgWrap + nnoremap w :ArgWrap endif "----------------------------------------------------------------------------------------------------------------------- @@ -321,6 +321,44 @@ endif +"----------------------------------------------------------------------------------------------------------------------- +" Syntastic +"----------------------------------------------------------------------------------------------------------------------- +if !empty(glob($EditorDir.'plugged/syntastic/plugin/syntastic.vim')) + let g:syntastic_php_checkers = ['php', 'phpcs'] + let g:syntastic_javascript_checkers = ['eslint'] + let g:syntastic_python_checkers = ['pyton3', 'flake8', 'mypy'] + let g:syntastic_scss_checkers = ['sass_lint'] + let g:syntastic_php_phpcs_args = "--standard=/root/PEARish.xml,PSR2,Symfony2" + let g:syntastic_always_populate_loc_list = 1 + let g:syntastic_auto_loc_list = 0 + let g:syntastic_check_on_wq = 1 + let g:syntastic_check_on_open = 1 + let g:syntastic_aggregate_errors = 1 + let g:syntastic_mode_map = { 'mode': 'active' } + function! ToggleSyntasticMode() +python << EOF +import vim +import ast +value = dict(vim.eval('g:syntastic_mode_map')) +vim.command('let l:syntastic_current_mode = \''+value['mode']+'\'') +EOF + SyntasticToggleMode + if l:syntastic_current_mode == 'passive' + SyntasticCheck + let g:syntastic_check_on_wq = 0 + let g:syntastic_check_on_open = 0 + else + let g:syntastic_check_on_wq = 1 + let g:syntastic_check_on_open = 1 + endif + endfunction + nnoremap a :call ToggleSyntasticMode() +endif +"----------------------------------------------------------------------------------------------------------------------- + + + "----------------------------------------------------------------------------------------------------------------------- " Taboo "----------------------------------------------------------------------------------------------------------------------- -- cgit v1.2.3