Older versions of Vim can crash if redraw is called while a popup is
visible. This commit adds a variable g:syntastic_delayed_redraws that
instructs syntastic to move redraws to a CursorHold / CursorHoldI
handler if redraw is called while pumvisible() is true.
It's now possible to deal with \0 characters in checkers' output.
Shell escaping is saner and safer.
SyntasticMake() has a new option 'preprocess'.
Checkers html/validator and eruby/ruby now use the new preprocess
option. Auxilliary script validator_decode.awk is no longer needed.
This patch adds an option 'postprocess' to SyntasticMake(). The value
of this option is a list of names. Each name is translated to a
function syntastic#postprocess#name(). These functions are applied in
order to the list of errors just before SyntasticMake() returns. They
take a single parameter, the list of errors, and are supposed to
returned the processed list.
If the first error in the location list refers to a file that isn't
loaded, entering the quickfix window would close it.
If `hidden` is set, `:quit`-ing the main file would not close the
quickfix window.
Move the autoloc list toggling out into its own notifier class.
Move the function that echos the error on the current line out into its
own notifier.
A few other changes were required in the process:
* move s:WideMsg() out into syntastic#util autoload lib so it is
available from the cursor notifier.
* move s:ShowLocList() into the LocList class so it is available for
the autoloclist notifier
* move s:HideLocList() into Loclist as a class method mainly to keep the
two show/hide methods together
* move the s:old_line var into the Cursor notifier where it is needed
update makeprg builder:
* it now accepts `fname`, `tail`, and `post_args` params.
* add some doc above syntastic#makeprg#build
* update a bunch of checkers to use the new params
Still have quite a few checkers that arent using makeprg#build.
Including all c* and a few other c-like checkers. And PHP.
Not to worried about c* as these checkers are complicated and probably
justify having their own logic to build makeprgs.
The problem
---
Some people want to change the syntax checker args and/or executable.
Currently they have to create their own checker to do this.
Solution
---
Create a standard API for building a makeprg that allows users to set
global variables to override the exe or args.
This API is in use in the coffee and python/flake8 checkers - as
proofs of concept.
So, if the user wanted to change the args that get passed to `flake8`
they can now set `let g:syntastic_python_flake8_args="--foo --bar"` in
their vimrc. Similarly they could set `let
g:syntastic_python_flake8_exe='python foo.py'`
If the shebang contains -T, then the makeprg looks like:
perl '/path/to/efm_perl.pl' -c -w '/tmp/foo.pl' -Tc
Mods to syntastic#util#ParseMagicNumber
* rename it to ParseShebang (since this name seems more common)
* return an empty result set rather than 0 so callers dont have to
check if empty()
Previously we were blowing away highlights that were added by other
plugins via matchadd(). To prevent this we now track all the ids of the
highlights groups we add and remove them explicitly with matchdelete().
Normally if location item has "col" item, syntastic#HighlightErrors() handle it without callback
call for performance reason. But sometimes it's necessary to handle all items with callback
(like in new vala syntax checker), so third optional bool arg is added to the function.
If this argument exists and has true value, then callback function is called on *all*
location items, no matter is they have "col" element or not.