Commit Graph

148 Commits

Author SHA1 Message Date
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
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