Skip to content

Commit

Permalink
Change defaults for Syntastic. (#679)
Browse files Browse the repository at this point in the history
  • Loading branch information
lcd047 authored and kalbasit committed Jan 10, 2017
1 parent 38c2472 commit 010fe66
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
url = https://github.com/MarcWeber/vim-addon-mw-utils.git
[submodule "janus/vim/tools/syntastic"]
path = janus/vim/tools/syntastic
url = https://github.com/scrooloose/syntastic.git
url = https://github.com/vim-syntastic/syntastic.git
[submodule "janus/vim/tools/tagbar"]
path = janus/vim/tools/tagbar
url = https://github.com/majutsushi/tagbar.git
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,11 +281,15 @@ based on the current context.

## [Syntastic](https://github.com/scrooloose/syntastic/)

Syntastic is a syntax checking plugin that runs buffers through external syntax
Syntastic is a syntax checking plugin that runs files through external syntax
checkers as they are saved and opened. If syntax errors are detected, the user
is notified and is happy because they didn't have to compile their code or
execute their script to find them.

Please see [`:help
syntastic`](https://github.com/vim-syntastic/syntastic/blob/master/doc/syntastic.txt)
for more information.

## [Tagbar](https://github.com/majutsushi/tagbar)

Tagbar is a vim plugin for browsing the tags of source code files.
Expand Down
17 changes: 14 additions & 3 deletions janus/vim/core/janus/doc/janus.txt
Original file line number Diff line number Diff line change
Expand Up @@ -308,12 +308,23 @@ In insert mode, start typing something and hit `<TAB>` to tab-complete
based on the current context.


## [Syntastic](https://github.com/scrooloose/syntastic/) *janus-features-syntastic*
## [Syntastic](https://github.com/vim-syntastic/syntastic) *janus-features-syntastic*

Syntastic is a syntax checking plugin that runs buffers through external syntax
Syntastic is a syntax checking plugin that runs files through external syntax
checkers as they are saved and opened. If syntax errors are detected, the user
is notified and is happy because they didn't have to compile their code or
execute their script to find them.
execute their script to find them. See `:help syntastic` for details.

**Customizations**: Janus adds a number of customizations to Syntastic:

* Set Syntastic to passive mode by default (use `:SyntasticToggleMode` to
toggle modes)
* Enable the statusline flag
* Always fill in location lists
* Open and close error windows automatically
* Enable syntax checks when opening files
* Disable syntax checks when quitting Vim with `:wq`, `:x`, and `:ZZ`
* Changes symbols for signs placed in the gutter margins.


## [Tagbar](https://github.com/majutsushi/tagbar) *janus-features-tagbar*
Expand Down
22 changes: 19 additions & 3 deletions janus/vim/tools/janus/after/plugin/syntastic.vim
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
if janus#is_plugin_enabled('syntastic')
let g:syntastic_enable_signs=1
let g:syntastic_quiet_warnings=0
let g:syntastic_auto_loc_list=2
if globpath(&runtimepath, 'plugin/airline.vim', 1) ==# '' && globpath(&runtimepath, 'plugin/lightline.vim', 1) ==# ''
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
endif

let g:syntastic_mode_map = {'mode': 'passive'}

let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0

let g:syntastic_warning_symbol = 'W>'
let g:syntastic_error_symbol = 'E>'
let g:syntastic_style_warning_symbol = 'W}'
let g:syntastic_style_error_symbol = 'E}'

let g:syntastic_stl_format = '[%E{E:%e(#%fe)}%B{,}%W{W:%w(#%fw)}]'
endif

0 comments on commit 010fe66

Please sign in to comment.