diff options
author | Cody Hiar <codyfh@gmail.com> | 2018-01-22 16:23:47 -0700 |
---|---|---|
committer | Cody Hiar <codyfh@gmail.com> | 2018-01-22 16:23:47 -0700 |
commit | 145cd08f1eee9380f7a011e4b1edfcb9cece3076 (patch) | |
tree | 1c0bdedddd874f1bf1c88ae6c9cdd028661c2213 | |
parent | 184c1dfb450a6dce4387d153b4842bf0f7c4e78f (diff) |
Adding back in syntastic options
-rw-r--r-- | plugin/vim-options.vim | 40 |
1 files changed, 39 insertions, 1 deletions
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 <silent> <leader>a :ArgWrap<CR> + nnoremap <silent> <leader>w :ArgWrap<CR> endif "----------------------------------------------------------------------------------------------------------------------- @@ -322,6 +322,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 <leader>a :call ToggleSyntasticMode()<CR> +endif +"----------------------------------------------------------------------------------------------------------------------- + + + +"----------------------------------------------------------------------------------------------------------------------- " Taboo "----------------------------------------------------------------------------------------------------------------------- if !empty(glob($EditorDir.'plugged/taboo.vim/plugin/taboo.vim')) |