-
Notifications
You must be signed in to change notification settings - Fork 1.1k
AlexJS Syntax Checker #1557
Comments
If this is your first attempt at writing VimL code, you chose a pretty bad place to start. The checker itself is relatively easy to get to work. It's pretty nasty to get it to work properly. Either way, you'll have to actually understand what you're doing. If you expect to copy bits and pieces from other checkers and put them together without knowing exactly what each piece does, you won't get anywhere. I can answer questions related to syntastic API. You'll have to look elsewhere for help related to VimL. Back to your checker, there are a number of problems with your code, and a number of problems with First, Then, Then, you're missing a let makeprg = self.makeprgBuild({}) However,
You can trick it to work, sort of (on UNIX at least; I imagine Windows is different): let makeprg = self.makeprgBuild({ 'tail': '</dev/tty' }) But this is really a bug in Next, the
It doesn't make any sense to match this in multi-line mode. You can match the filename with Ignoring the second pair of line/column, you can match the error lines like this: '%*[ ]%l:%c-%*\d:%*\d%*[ ]%tarning%*[ ]%m' Here Finally, you need to ignore the rest of the junk. This is done with let errorformat =
\ '%P%f,' .
\ '%-Q,' .
\ '%*[ ]%l:%c-%*\d:%*\d%*[ ]%tarning%*[ ]%m,' .
\ '%-G%.%#' If you do it like this, the error text doesn't contain either spurious spaces or embedded newlines, so you can drop the Next you need to add everything to return SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat,
\ 'subtype': 'Style',
\ 'returns': [0, 1] }) The So, a crude checker might look like this. Now, to get it to work properly. First, Then you'll probably want syntax highlighting. You can in principle add that using the column numbers (see Finally, if you insist on checking plain text files, you could add a redirect from |
As it turns out, a checker for |
Thanks for all of this @lcd047 I've been following the discussion. |
This is not an issue as it is more a question of help!!!
I'm trying to write a text checker for AlexJS, which checks for insensitive writing. Using the docs and the existing checkers I'm just not getting it to work. I'm a noob when it comes to writing ViM, so any help would be awesome. If this is not the appropriate place to post this, please direct me to it and I'll gladly move it over there.
The text was updated successfully, but these errors were encountered: