Commit Graph

959 Commits

Author SHA1 Message Date
Martin Grenfell
58ba8d3161 refactor how we represent and store checkers using python as a demo
Add 2 classes: SyntasticChecker and SyntasticRegistry.

SyntasticChecker represents a checker. It holds funcrefs to the checker
func, the highlight regex func and a new `isAvailable()` func (that
essentially just checks if the checker exe is installed)

SyntasticRegistry is responsible for:
* loading checkers
* storing checkers
* fetching the checkers to use according to availability and the users
  settings

Motivation/benefits:
* in the current system only one checker can be loaded per filetype
* syntax checkers cant be "chained" together
* the system is hard to add features to since fundamental concepts like
  syntax checkers and location lists arent represented explicitly

Things left to do:
* add a call to g:SyntasticRegistry.CreateAndRegisterChecker() to all
  checkers
* add an `isAvailable` function to all checkers
* move all checkers into `syntax_checkers/filetype/checkername.vim` -
  g:SyntasticRegistry assumes this layout, and its a good idea anyway
  for consistency and it makes it easier for users to add their own
  checkers

Things to do after all of the above:
* add a LocationList class and move all the filtering functions onto it
* possibly add an Error class that wraps up each item in a loc list

Random notes:
* with the new system you can select the checkers to use with e.g.
    `let g:syntastic_python_checkers=['flake8', 'pylint']`
  This will try flake8 first, and if no errors are detected it will move
  onto pylint.
2013-01-24 00:19:13 +00:00
Martin Grenfell
d48f43c222 wrap screen redrawing in a function to try and avoid screen flicker
Some versions of gvim flicker when `redraw!` is used. Use `redraw` for
them and use `redraw!` for terminal vim.

Fixes #449
2013-01-16 09:42:22 +00:00
Alex Efros
ccfdcef04d Merge branch 'master' into E855-on-lclose 2012-12-19 17:25:05 +02:00
Martin Grenfell
fc4ec2533c Merge branch 'load_any_checker' 2012-12-04 09:33:34 +00:00
Martin Grenfell
42480a01a1 modify SyntasticLoadChecker to load any checkers present
Previously we were only loading "official" checkers that had been added
to syntastic. Now we load any checker that is in the right directory.

This allows anyone to add custom checkers to any filetype that uses
`SyntasticLoadChecker()`
2012-12-03 21:22:44 +00:00
Martin Grenfell
7fe3ac44c2 allow custom checkers by just defining a checking function
Problem: users want to define their own checking function and not use
the syntastic defaults

Solution: dont load the syntastic default if a checking function
already exists. This way users can just define their own function and
override syntastic.

e.g. the user wants to have their own ruby checker, so in their vimrc
they just add:

    function! SyntaxCheckers_ruby_GetLocList()
        return SyntasticMake({"some custom stuff"})
    endfunction
2012-12-03 10:59:11 +00:00
David Barnett
b209693a2a Only set g:loaded_FT_syntax_checker if unset 2012-11-27 07:43:42 -08:00
David Barnett
dcac33ecc0 Set g:loaded_FOO_syntax_checker in syntastic.vim, not every ft file. 2012-11-26 21:44:43 -08:00
Martin Grenfell
36db8f4b16 fix a bug with highlighting and getmatches
Highlighting requires vim >= 7.1 with patch 40. It should be disabled
otherwise.

Fix a bug with the version check.

Closes #250.
2012-11-17 20:15:45 +00:00
Charles Lehner
3199ca3235 Explain why tabs are converted to spaces in error messages. 2012-10-25 20:01:31 -04:00
Charles Lehner
57e962865f Prevent tabs in error messages from causing "press enter" prompt.
Convert the tabs to spaces so that they are counted towards the window width
and the status message does not wrap.
2012-10-25 17:20:07 -04:00
Martin Grenfell
33427121ec fix a bug introduced in 60a3588d30
Two different calculations were incorrectly combined in
s:OSSupportsShellpipeHack().

Introduce s:IsRedrawRequiredAfterMake() to hold the other calculation.

Closes #388
2012-10-23 23:05:00 +01:00
Richard Brown
6382dc2124 Put getmatches check in a more sensible place 2012-10-01 15:10:53 +01:00
Richard Brown
ca1d129b3f s/HightlightErrors/HighlightErrors/g 2012-09-27 13:45:14 +01:00
Richard Brown
4bb4ec6550 Highlighting requires vim-7.1.040
Fixes Issue #250
2012-09-27 13:44:45 +01:00
Martin Grenfell
9849a6b8ac move s:uname() in with the rest of the functions - close to its usage 2012-09-24 18:53:15 +01:00
Martin Grenfell
9ccef501e9 Merge remote-tracking branch 'cehoffman/master'
Conflicts:
	plugin/syntastic.vim
2012-09-24 18:52:18 +01:00
Richard Brown
87f10e54d4 Make IsVersionAtLeast global 2012-09-22 19:51:12 +01:00
Martin Grenfell
127422c11e move SyntasticCheckable() down with the other public functions 2012-09-18 00:41:36 +01:00
Martin Grenfell
171776140b Merge remote-tracking branch 'rbrown/sh2'
Conflicts:
	syntax_checkers/sh.vim
2012-09-18 00:20:15 +01:00
Martin Grenfell
70f8354420 Merge pull request #318 from dstanek/master
Fixes issue #311
2012-09-07 02:35:15 -07:00
Richard Brown
0140f4baca Add syntax checker for ft=zsh
The current sh.vim checks for ft=sh and #!/bin/zsh  This add a checker
specifically for ft=zsh and changes sh.vim to call the same code.
2012-09-06 09:53:34 +01:00
Jamie Wong
98437c8752 Always update the location list, even if empty 2012-08-25 01:41:05 -04:00
David Stanek
2bad8761fa Fixes #311: errors not showing up in statusline
s:Errors() function loops through the location list lookin for errors
and caches the result. The function is called indirectly by
SynasticStatuslineFlag before the location list has content. This patch
ensures s:Errors only gets called if location list has content.
2012-08-10 03:23:46 -04:00
Martin Grenfell
1fb8366456 Merge pull request #244 from mootoh/master
Javascript syntax check with Google Closure Compiler
2012-07-28 09:43:42 -07:00
Martin Grenfell
cdd36c6479 populate the location list when :Errors is called
The location list must be set when calling :Errors since our cached
error list is associated with the buffer, but the vim loclist is
associated with the window.

So if the user closes a window, the vim loclist will get destroyed, but
our error list will still exist.

Closes #263
2012-07-24 12:25:16 +01:00
Arnout Kazemier
5ec845ea0d Added configuration option for the symbols that are used in the signs.
This allows users to configure their own indicators symbols
2012-07-17 16:05:51 +02:00
Martin Grenfell
60a3588d30 refactor the checks for the shell/shellpipe hack compatability
move the check into its own function to DRY up the code and add an
intention revealing name to the if statements
2012-07-01 22:48:54 +01:00
Alex Efros
f7e91e821f Fix E855 on :lclose
Since 7.3.449 trying to :lclose inside BufWinLeave result in E855:

    $ vi -u /dev/null --noplugin -N
    :autocmd BufWinLeave * if empty(&bt) | lclose | endif
    :lexpr(':1:msg') | lopen | wincmd p | lclose
    E855: Autocommands caused command to abort

    $ vi -u /dev/null --noplugin -N
    :autocmd BufWinLeave * if empty(&bt) | lclose | endif
    :lexpr(':1:msg') | lopen | wincmd p | q
    E855: Autocommands caused command to abort

Another issue with this autocmd is &bt in BufWinLeave may be different from
the buffer being unloaded (this is documented behaviour for BufWinLeave).
Replacing &bt with getbufvar(0+expand('<abuf>'), '&bt') solve this, but
doesn't fix issue with E855 completely (first of above examples with
:lclose is fixed, but second with :q is not fixed).

So, to work around E855 I've changed way to close location-list:
instead of closing it on BufWinLeave, it's closed on BufEnter into
location-list window if it's only buffer in current window.
2012-05-26 15:19:28 +03:00
Aaron Bieber
e315263ba6 Add fix for OpenBSD 2012-05-25 12:53:21 -06:00
Chris Hoffman
98b7e0e01b Delay an expensive startup cost until needed 2012-05-08 09:58:06 -05:00
Hong Xu
30d7462249 Remove some unnecessary win64 checks.
has('win32') is always true on Win64.
2012-05-08 20:31:20 +08:00
Motohiro Takayama
b94510fea3 Do not check if the syntax_checker exists and is executable.
Syntax checker name should be the filename of the syntax_checkers/*.vim.
It can be any filename, and can be the name which does not exist in the PATH.
2012-05-07 12:23:51 -07:00
Martin Grenfell
5c7f2b800d Merge pull request #227 from mschulkind/master
Stop clobbering global variables
2012-04-20 07:15:30 -07:00
Matthew Schulkind
4611645c18 Stop clobbering global options. 2012-04-20 10:11:07 -04:00
Florent Bruneau
999d3c1bb3 Only keep "valid" entries in the error count.
The location list returned by getloclist() may contain entries that are
not errorformat matches. By "definition", (see :help getqflist), matched
lines have the attribute "valid": 1 set, so only keep those lines in
error/warning list to avoid erroneous counts and strange behaviors.

Signed-off-by: Florent Bruneau <florent.bruneau@intersec.com>
2012-03-28 19:48:54 +02:00
Martin Grenfell
3c569d2b97 pass a filetype to SyntasticLoadChecker
This is needed to handle compound filetypes since we cant imply the
location of the syntax checker file from the filetype.

e.g. we want to load `syntax_checkers/python/pylint.vim`, but the
filetype is `python.django`. Previously this was causing `runtime
syntax_checkers/python.django/pylint.vim` to be executed.
2012-03-21 09:42:11 +00:00
Bram Schoenmakers
a6be206b71 Safely fetch the 'col' key of an error, it may not exist.
Since commit 892cc2, errors appeared on screen for example when checking
shell scripts.
2012-03-20 22:41:33 +01:00
Martin Grenfell
892cc2c232 refactor the error highlighting system
* remove the public SyntasticHighlightErrors() function
* shift the above code into s:HighlightErrors(). This is called
  automatically if g:syntastic_enable_highlighting is set
* to get the highlight regex we just look for a function called
  Syntastic_<filetype>_GetHighlightRegex
* to force this function to be called, each error item must have the
  'force_highlight_callback' key set

This code has one important functional change: now errors are *always*
highlighted if possible whereas previously they were only highlighted if
a call to SyntasticHighlightErrors was made.
2012-03-02 10:05:15 +00:00
Martin Grenfell
b4a7d47294 performance improvements: cache errors and warnings explicitly
There are many calls to s:Errors() and s:Warnings(), and previously the
location list was filtered once for each of these calls. This made vim
unusable when handling large location lists (with hundreds of entries).
Now we cache the errors and warnings explicitly when we cache the
location list.

Rework some of the minor methods so that they call s:Errors() or
s:Warnings() (which use the cached data) instead of calling
s:FilterLocList() directly (which is expensive).
2012-02-18 16:01:17 +00:00
Martin Grenfell
e44494558f minor performance improvements to the statusline function 2012-02-18 15:38:42 +00:00
Martin Grenfell
9594d34003 performance improvements for FilterLocList()
Remove the call to deepcopy() and use some alternative logic instead.

This improves performance massively for large location lists. More
aggressive caching is needed really though since this function is called
multiple times to return the same data.
2012-02-18 15:36:44 +00:00
Martin Grenfell
3e80184d5f bump to v2.3.0 and update changelog and credits 2012-02-16 17:20:03 +00:00
Martin Grenfell
9a6895d28d add syntastic_loc_list_height option
This allows the user to specify what height the loc list should be
opened at. Solves  issue #153.
2012-02-10 17:56:32 +00:00
Martin Grenfell
b30a9fad9a update some comments to reflect the new subtype functionality 2012-02-08 13:31:20 +00:00
Martin Grenfell
0de450de20 simplify how the 'subtype' option is added to errors
this is just a refactor to make things simpler and shorter
2012-02-08 13:31:20 +00:00
Martin Grenfell
2b514d84bd Merge pull request #158 from technosophos/master
Support for subtypes
2012-02-07 08:31:54 -08:00
Matt Butcher
516b2eec4f Per #158: Removed SubtypeMasksType.
Because the subtype checker is never run when an error is found,
this is not necessary anymore.
2012-02-07 10:02:21 -06:00
Martin Grenfell
fa1084cf8f DRY up the code that loads checkers when multiple exist
Javascript and json have multiple syntax checkers that can be loaded.
Previously the logic to determine which checker to load was basically
copied and pasted in both. The `go` checker will soon have more
than one option too so remove the duplication by sticking the
common code in the core.
2012-02-06 17:46:08 +00:00
Matt Butcher
8df5c3bcdc Added support for error/warning subtyping. 2012-01-27 13:43:48 -06:00
Martin Grenfell
54896becd3 bump to 2.2.0 and update changelog 2011-12-24 11:31:19 +00:00
Martin Grenfell
466f762841 add a ! to a function def 2011-12-24 11:05:51 +00:00
Martin Grenfell
d88db85b07 refactor g:syntastic_check_on_open
init g:syntastic_check_on_open with the rest of the options - this means
we only check exists("...") once rather than every time the autocmd is
run. Plus it reads better IMO.
2011-12-24 09:44:01 +00:00
kongo2002
9a9da94494 evaluate g:syntastic_check_on_open without having to restart vim 2011-12-24 01:33:07 +01:00
Martin Grenfell
9633837e16 dont do syntax checks when opening buffers
Only do syntax checks when saving files. Add the g:syntax_check_on_open
option to force the check when opening.

See #134
2011-12-23 23:46:39 +00:00
Martin Grenfell
7fe7900c8b refactor s:AutoToggleLocList()
move some code out of AutoToggleLocList and into UpdateErrors so that
AutoToggleLocList is only responsible for displaying/hiding the location
list window
2011-12-23 13:56:49 +00:00
Martin Grenfell
2c6b271321 simpify s:ModeMapAllowsAutoChecking() 2011-12-22 00:10:13 +00:00
Martin Grenfell
d13264513d Revert "remove the ability to check compound filetypes"
This reverts commit fb0259a4ef.

Turns out there is a use case for this after all, as reported by
@benjifisher in #133

Conflicts:

	plugin/syntastic.vim
2011-12-21 23:52:58 +00:00
Martin Grenfell
a24bf027cc fix a bug with EchoCurrentError
due to an error in the logic, the echo window was being cleared after
every cursor movement instead of when moving the cursor off an error
2011-12-19 23:04:49 +00:00
kongo2002
ef7deb1127 fix bug in s:Errors() introduced with commit 755eddaa 2011-12-18 17:57:03 +01:00
Martin Grenfell
755eddaa06 make all loclist items errors by default
If a syntax checker returns items with blank 'type' keys, then make them
errors. This simplifies things since we were previously making the
assumption that empty types are errors anyway. It also fixes a bug in
EchoCurrentError() function that was due to not checking for a blank ty
pe.
2011-12-18 00:47:46 +00:00
Martin Grenfell
fb0259a4ef remove the ability to check compound filetypes
remove this for now since it is not being used and will probably never
be used
2011-12-18 00:41:44 +00:00
Martin Grenfell
7c623b7278 Revert "add Lclose() and use it when closing the loc list"
This reverts commit e90aa61ca6.

The idea here was to only close the location list window if it could be
verified that it contained only syntastic data. This was done by
comparing the current location list with b:syntastic_loclist to see if
they are the same.

The problem is that, after we recheck errors, b:syntastic_loclist is
empty (if the user has fixed everything) so it doesnt match
getloclist(0) so we cant close it automatically.

Revert this for now and worry about the issue later - if a user
complains or if a new plugin that uses location lists comes up.

Conflicts:

	plugin/syntastic.vim
2011-12-17 19:16:00 +00:00
Martin Grenfell
2385a0b581 make s:FilterLocList() work on s:LocList() by default 2011-12-16 16:57:06 +00:00
Martin Grenfell
ec3ac50f76 refactor b:syntastic_loclist to s:LocList() and s:ClearLocList()
This allows us to lazy init b:syntastic_loclist so we dont have to worry
about doing `if exists("b:syntastic_loclist")` anywhere.

Im a bit worried about doing things like

    s:LocList()[0]['lnum']

since im not sure that that syntax is supported for older versions of
vim.
2011-12-16 16:48:26 +00:00
Martin Grenfell
1e8d54d964 dont do syntax checking for any file that is non standard 2011-12-16 16:28:06 +00:00
Martin Grenfell
e90aa61ca6 add Lclose() and use it when closing the loc list
Lclose() acts as :lclose except that it checks the content of the
location list and calls :lclose if it only contains syntastic data
2011-12-16 13:36:07 +00:00
millermedeiros
d04c9766c7 BufWinLeave is always called before BufUnload, redudant. 2011-12-16 11:00:55 -02:00
millermedeiros
233f7952f1 ops, forgot to check buftype before calling lclose, avoid calling it if not needed. 2011-12-16 10:42:05 -02:00
millermedeiros
d3b122dfba fix loc list auto close. see #123
- changed BufLeave to BufWinLeave otherwise it would close when
   jumping to loc list.
 - extracted method that auto close/open location list based on
   errors/settings and make sure it reopens loclist when buffer is
   displayed (BufWinEnter) if needed.
2011-12-16 10:30:56 -02:00
millermedeiros
0d1943e6f5 auto close location list when closing or moving to another buffer. also update errors on BufEnter. see #123 2011-12-16 02:23:00 -02:00
Martin Grenfell
d053c8da1d trivial refactor 2011-12-15 23:09:17 +00:00
Martin Grenfell
bfe3725e13 make EchoCurrentError() not mask errors with warnings 2011-12-15 23:08:39 +00:00
Martin Grenfell
17f9b764de dont clobber error signs with warning signs 2011-12-15 22:52:35 +00:00
Martin Grenfell
26b45eeccf add a couple of "!"s to function defs - for consistency 2011-12-15 22:31:19 +00:00
Martin Grenfell
d85130ddf5 update errors when :SyntasticToggleMode is called
Previously if we have errors displayed and we just want syntastic to
shut up, then we would use :SyntasticToggleMode but existing errors
would not be removed (ever).

So empty them out when we toggle modes.

When coming into active mode this will cause a check to be done which
will pick up errors as normal.
2011-12-15 13:45:48 +00:00
Martin Grenfell
a210721744 change to version 2.1.0 2011-12-14 09:06:16 +00:00
Martin Grenfell
8717ff7f46 make a small refactor and add a comment 2011-12-13 23:28:39 +00:00
James Rowe
0b6587dbb6 Handle filetype names containing hyphens.
The gentoo vim syntax files use names like gentoo-mirrors, gentoo-metadata, etc.
This simple, and very ugly, fix makes it possible to write syntax checkers for
them.
2011-12-13 17:30:19 +00:00
Martin Grenfell
cafb55b3c8 fix a minor issue when echoing the current error
Only clear the cmd window when it is displaying a message that we
echoed. Previously we were echoing a blank line every time the cursor
moved - this was clearing messages generated from other sources than
syntastic.
2011-12-11 09:32:36 +00:00
Martin Grenfell
e24bd80f44 fix a strange bug when echoing error messages
In the javascript:jshint checker the error messages are being returned
with a newline prefixed to the front. I have tried to fix this in the
errorformat - but I cant see anything that would cause it.

Im not sure if this is a one-off thing, but strip out all new lines here
just in case.
2011-12-11 09:26:55 +00:00
Martin Grenfell
8491df95d6 move the main autocmd into the syntastic augroup 2011-12-10 01:18:20 +00:00
Martin Grenfell
8e6ebec56e echo the current error in the cmd win
This is largely taken from kevinw's pull request (#46).

Add the g:syntastic_echo_current_error option to deactivate the
functionality.
2011-12-10 01:15:24 +00:00
Martin Grenfell
cda718643c use custom highlight groups instead of tracking match ids
Use SyntasticWarning and SyntasticError highlight groups when calling
matchadd(). This makes it trivial to clear all of our highlights without
having to store IDs.

Stole this code from kevinw's pull request (#46)
2011-12-10 00:18:28 +00:00
Martin Grenfell
a7f5428aaa remove -nargs=0 from the :commands since this is the default 2011-12-09 23:49:21 +00:00
Martin Grenfell
da78242123 add an option to SyntasticMake to specify defaults
Many of the syntax checkers were setting the 'bufnr' key for each
error manually and one was setting 'text' if it didnt exist too.

Add the 'defaults' option to SyntasticMake to set default values in the
returned error list - it only sets values if they are empty.
2011-12-09 13:47:42 +00:00
millermedeiros
90e76649f9 balloon_eval is already being checked at the top. see #114 2011-12-09 11:31:10 -02:00
millermedeiros
c95cf15823 safe-guard against signs/balloons user settings when these features aren't available. see #113 2011-12-09 10:57:28 -02:00
Martin Grenfell
7d8b7b3157 add an option to disable error highlighting 2011-12-08 22:23:51 +00:00
Martin Grenfell
bb9c87383f rearrange and comment some functions
Move 2 functions further up syntastic.vim so that all public functions
are at the bottom - purely to be tidy.

Stick some comments on functions - most functions now have at least a
one liner explaining them.

Also, rename a variable in SyntasticHighlightErrors (since I had to look
at the log to figure out what it was).
2011-12-08 20:49:24 +00:00
millermedeiros
75a5b9abfe better check for balloons as well, not throwing error but no need to call RefresBalloons if it isn't supported. 2011-12-07 11:26:19 -02:00
millermedeiros
2a88c6f219 fix error thrown while opening vim on a environment that doesn't support signs. 2011-12-07 11:16:11 -02:00
Martin Grenfell
af83357512 fix a bug with error highlighting
Store error highlight IDs on a per window basis rather than per buffer.

This is needed as matchadd() adds highlights to the current window - not
buffer. This meant an error would occur when you open a file, create an
error that caused a highlight, then open the same file in a different
window - because it would call matchdelete() with an id that wasnt
defined for the current window.
2011-12-04 00:45:07 +00:00
Martin Grenfell
975315c665 fix a bug where balloons werent being removed
Remove balloons on every refresh so they dont get left there if all
errors are fixed on the next refresh.

NO ONE LIEKS ZEE STALE BALLOONS!
2011-12-04 00:45:07 +00:00
Martin Grenfell
4ee40b271e fix a bug that was occurring with balloons
Don't try to display balloons when no errors were detected. Refactor the
ballon refresh code out into its own function.
2011-12-02 09:53:49 +00:00
Martin Grenfell
5d479552f3 fix a syntax error with the SyntasticCheck command 2011-12-02 09:36:11 +00:00
Martin Grenfell
45c77595c9 update the header comments for version 2.0.0 2011-12-02 00:27:14 +00:00
Martin Grenfell
aa67390bd6 make syntastic more active by default
Enable more of the features by default while avoiding some of the more
intrusive ones.

Update the doc to reflect this.
2011-11-30 19:56:27 +00:00
Martin Grenfell
965b3b7203 move the highlighting/balloon code into the main plugin file
In future I may move most of the code out into an autoload file, but in
the meantime I want all the code tidy and in one place for the next
release
2011-11-30 19:23:31 +00:00
Martin Grenfell
31d3a7d619 trivial cosmetic code fix 2011-11-29 08:44:51 +00:00
Martin Grenfell
5c0dbc5d05 init the components of syntastic_mode_map separately
this allows the user to skip components in their own definition
2011-11-29 08:44:09 +00:00
Martin Grenfell
295f7a5d29 shift the :command definitions to a common place - to be tidy
Previously they were with their associated functions, but better to have
them all in one place.
2011-11-29 08:38:28 +00:00
Martin Grenfell
47147aad17 remove the old code to disable/enable filetypes
This system has been superseded by the new mode map code. If requested
in future, some code may be added to manipulate the active/passive types
in the mode map at runtime to provide the same functionality.
2011-11-29 08:36:42 +00:00
Martin Grenfell
78fbd7fa13 add g:syntastic_mode_map option
This option will allow users to fine tune when automatic syntax checking
is done.

The option should be set to something like:

let g:syntastic_mode_map = { 'mode': 'active',
                           \ 'active_filetypes': [],
                           \ 'passive_filetypes': ['puppet'] }

g:syntastic_mode_map['mode'] can take one of 2 values - "active" or
"passive". When set to active, syntastic does automatic checking as
usual. When set to "passive" syntastic only checks when the user calls
:SyntasticCheck.

The exceptions to these rules are defined in "active_filetypes"
"passive_filetypes". In passive mode, automatic checks are still done
for all filetypes in the "active_filetypes" array. In active mode,
automatic checks are not done for any filetypes in the
"passive_filetypes" array.
2011-11-28 23:44:40 +00:00
Martin Grenfell
e7b8375dec Merge remote-tracking branch 'justone/add_one_time_check' 2011-11-28 23:41:53 +00:00
Martin Grenfell
3d385cf0cd fix a bug on windows 2011-11-28 23:38:45 +00:00
Matthew Batema
f4177a3236 Counter-hack to provide screen redraw on FreeBSD
I'd attempted to find something useful in the sh/csh/tcsh man pages to
get similar shell redirection that &>/>& does, but it appears that all
fds are redirected, not just stderr and stdout.
2011-09-19 13:10:53 -07:00
Nate Jones
bb37d47018 add command to force a syntastic check
This allows a particular file type to be disabled but still be checked
when desired.  Useful for syntax checks that take a few seconds like the
puppet one.
2011-09-09 17:46:56 -07:00
Pavel Argentov
6b2fd05b66 FreeBSD shell workaround 2011-08-16 21:46:39 +04:00
Martin Grenfell
08e61a8c94 automatically update errors when enabling/disabling syntax checkers
If a user uses :SyntasticEnable or :SyntasticDisable, update the errors
for the buffer automatically if possible
2011-07-12 10:59:41 +12:00
Martin Grenfell
714392db16 only load syntax checker plugins when needed
This reduces the number of unnecessary files that get sourced.
2011-07-04 23:48:26 +12:00
Konstantin Stepanov
0bd7218382 Issue #44 fixed 2011-05-27 00:44:55 +03:00
Konstantin Stepanov
74f3bb0a93 balloons support 2011-05-03 02:21:16 +03:00
Martin Grenfell
219d02f4d7 add an option to allow users to format the statusline flag
Add the syntastic_stl_format flag and doc it under
:help syntastic_stl_format. This allows the user to control what
information is displayed in the syntastic statusline flag.
2011-02-19 20:10:20 +13:00
Martin Grenfell
6f18a97b0f set shell back regardless of whether we are running windows
This is purely in the interests of keeping the code simple.
2011-02-18 10:02:31 +13:00
Brian Donovan
e0d7338bdb Make sure we specify the shell to use since '&>' doesn't work in all shells. 2011-02-17 12:53:53 -08:00
Donald Ephraim Curtis
fc2a2e1134 Simplify the auto_loc_list options.
Don't allow "full_auto" and "semi_auto".
2011-02-15 21:49:54 -06:00
Donald Ephraim Curtis
ffae882541 slight modification to auto_loc_list behavior
g:syntastic_auto_loc now has the following possible options:

1 or "full_auto" or "fully_auto" behaves as normal, closing the loclist
when there are no errors and opening when there are errors.

2 or "semi_auto" will automatically close the loclist but _not_
automatically open it.
2011-02-15 21:45:44 -06:00
Martin Grenfell
09d0a091f0 move the syntastic_jsl_conf option out of the core plugin
Move this variable out of syntastic.vim since we dont the core plugin
shouldn't know any details of how the individual syntax checkers work.
2011-02-15 19:49:13 +13:00
Bryan Forbes
5bc6c2226f Added option to pass a config file to jsl. 2011-02-14 20:59:35 -06:00
Martin Grenfell
e2f8d56bc4 fix a bug with s:ErrorsForType()
compare the error type case insensitively since we cant know whether
errors will have a type of 'E' or 'e'
2011-02-12 01:15:00 +13:00
Donald Ephraim Curtis
e30ee7ce8b Fixed the problem with closing the Errors window and then wanting to
re-open it.  This error occurs when g:syntastic_auto_loc_list is
enabled.
2011-02-05 12:09:41 +13:00
Donald Ephraim Curtis
aebfc62a3b Silence the :ll command when auto_jump is enabled.
The message for the current error was being displayed when :ll was being
called.  Put a silent call to suppress output.
2011-02-05 12:09:27 +13:00
Donald Ephraim Curtis
9e6ad47d71 Add an option to jump to the first error. 2011-02-05 12:09:20 +13:00
Donald Ephraim Curtis
ddd858d8c1 Make it so that Loccation List is always populated.
Previously, the location list didn't get populated unless the Errors
window was displayed.  As a consequence there is no way to use :lnext
and :lprev to navigate the errors.  This makes it so that the list is
populated if there are new errors/warnings.
2011-02-05 12:08:56 +13:00
marty
4b690ba5e2 switch to version 1.2.0 and update the changelog 2010-10-28 23:13:34 +13:00
marty
97d6937dd4 only sign errors for the current buffer 2010-09-10 21:20:04 +12:00
marty
4e31dc1eb0 switch to version 1.1.0 2009-12-16 23:34:40 +13:00
marty
5ad3cd67c1 change my email to gmail, hotmail licks ass crack 2009-12-16 23:02:36 +13:00
marty
5ea36cb882 add commands to disable/enable syntax checking per filetype
Add these:
    :SyntasticDisable [filetype]
    :SyntasticEnable [filetype]

[filetype] defaults to the current filetype.

Add functions to bind the commands to.

Add g:syntastic_disabled_filetypes option to specify which filetypes
are disable by default.
2009-09-20 22:49:59 +12:00
Tim Pope
c83e196c84 Don't automatically focus quickfix window 2009-09-14 23:24:31 +12:00
marty
6b6546c8cc dont use :signs if vim wasnt compiled with them 2009-09-13 18:41:47 +12:00
marty
9712de9a47 remove bogus info from a method comment 2009-09-13 18:38:10 +12:00
marty
564496ed5a switch to version 1.0.0 2009-08-11 21:11:51 +12:00
Martin Grenfell
1cde42cb23 rename a var for consistency 2009-07-29 16:07:04 +12:00
Martin Grenfell
4b769b1dbe add syntastic_quiet_warnings option 2009-07-20 22:26:03 +12:00
Martin Grenfell
b8d2430814 add a doc file, remove the doc from the top of the script 2009-07-18 23:41:04 +12:00
Martin Grenfell
3dee539a2e some minor cleanups 2009-07-17 16:13:27 +12:00
Tim Carey-Smith
33d7086c34 Only auto-display the loclist if there are errors, but not if there are only warnings
Signed-off-by: Martin Grenfell <martin_grenfell@msn.com>
2009-07-17 12:09:27 +08:00
Martin Grenfell
0e98aa36c4 add SyntasticMake() to wrap up the :lmake procedure 2009-07-15 21:28:44 +12:00
Martin Grenfell
62abcf0b3d fix a typo 2009-07-15 19:34:17 +12:00
Martin Grenfell
1d3a963ee2 use todo hl group for warnings (looks better) 2009-07-15 19:23:02 +12:00
Martin Grenfell
89ec27e97f add a note about syntastic_auto_loc_list 2009-07-14 21:43:33 +12:00
Martin Grenfell
7fc70a741d place different signs for warnings 2009-07-14 14:10:47 +12:00
Martin Grenfell
378f74287f render new signs before deleting the old ones
this stops the sign column from flickering on and off
2009-07-14 13:47:46 +12:00
Martin Grenfell
7f60f42a2a add a todo note about the use of lclose 2009-07-13 23:23:04 +12:00
Martin Grenfell
03f4bd521e fix typo in a comment 2009-07-13 23:13:22 +12:00
Martin Grenfell
33fd1d9cd8 use location list instead of quicklist 2009-07-13 23:12:18 +12:00
Martin Grenfell
624c0b370b add sntastic_auto_copen option 2009-07-13 21:38:50 +12:00
Martin Grenfell
68d6ac09a2 refresh errors on bufreadpost instead of filetype
this is to stop the multiple syntax checking invocations that were
occurring when &ft was being detected as compound eg ruby.sinatra. i.e.
the ft was getting set as ruby, then another autocommand was resetting
it to ruby.sinatra, causing the syntax checking to be run twice.
2009-07-12 12:13:06 +12:00
Martin Grenfell
23a3edb4ed check all subfiletypes if &ft = "foo.bar" 2009-07-12 12:07:26 +12:00
Martin Grenfell
f2eb99d374 reset the next sign id after clearing signs 2009-07-12 01:35:29 +12:00
Martin Grenfell
75a06c41b0 update example syntax checker in blurb 2009-07-11 16:48:37 +12:00
Martin Grenfell
3d74f6df47 add a note about the stl flag to the blurb 2009-07-11 16:22:23 +12:00
Martin Grenfell
256b4225f2 update the blurb 2009-07-11 15:57:03 +12:00
Martin Grenfell
29ae4163b6 make the :sign stuff optional 2009-07-11 13:47:17 +12:00
Martin Grenfell
daa53659bd add a blurb at the top 2009-07-11 13:39:39 +12:00
Martin Grenfell
fa76e28947 rearrange some code and add comments 2009-07-11 11:55:51 +12:00
Martin Grenfell
20f7bb0d10 initial hacks 2009-07-11 11:09:52 +12:00