vim-syntastic / syntastic

Syntax checking hacks for vim
Do What The F*ck You Want To Public License
11.3k stars 1.14k forks source link

Feature: g:syntastic_check_on_write #2327

Closed cheery closed 4 years ago

cheery commented 4 years ago

Syntastic is used with purescript's psc-ide-vim, where it works very well for working through errors. It is nice to use except for this one detail that perhaps could be added.

Purescript's file checking command takes about enough time to be noticed when it is hooked into :w through syntastic. Could we add something like g:syntastic_check_on_open, but on the write side?

I read your contribution guidelines, and I can draft the modification. Just let me know if you like to let me try it. Also, please inform if this is a redundant modification and it can be already done somehow.

lcd047 commented 4 years ago

Please read: :h 'syntastic_mode_map'.

cheery commented 4 years ago

This seems to do it!

"mode" can be mapped to one of two values - "active" or "passive". When set to "active", syntastic does automatic checking whenever a buffer is saved or initially opened. When set to "passive" syntastic only checks when the user calls :SyntasticCheck.

I will try it out, if it works, I'll close the commit next.

cheery commented 4 years ago

Thanks for the help. This does work. I'm sorry that I didn't read the documentation in whole. This feature is described in the section 2. Functionality provided.