From e54f28e338a934e1be4e8ab0324d55c38df90170 Mon Sep 17 00:00:00 2001 From: LCD 47 Date: Tue, 15 Jul 2014 08:57:37 +0300 Subject: [PATCH] New redirect checker for arduino: avrgcc. --- README.markdown | 20 ++++++++++---------- plugin/syntastic.vim | 2 +- plugin/syntastic/registry.vim | 1 + syntax_checkers/arduino/avrgcc.vim | 26 ++++++++++++++++++++++++++ syntax_checkers/c/avrgcc.vim | 2 ++ syntax_checkers/erlang/syntaxerl.vim | 2 ++ 6 files changed, 42 insertions(+), 11 deletions(-) create mode 100644 syntax_checkers/arduino/avrgcc.vim diff --git a/README.markdown b/README.markdown index 7a7f2e08..d0eb41f2 100644 --- a/README.markdown +++ b/README.markdown @@ -35,16 +35,16 @@ the user is notified and is happy because they didn't have to compile their code or execute their script to find them. At the time of this writing, syntax checking plugins exist for ActionScript, -Ada, AppleScript, AsciiDoc, ASM, BEMHTML, Bro, Bourne shell, C, C++, C#, Cabal, -Chef, CoffeeScript, Coco, Coq, CSS, Cucumber, CUDA, D, Dart, DocBook, Dust, -Elixir, Erlang, eRuby, Fortran, Gentoo metadata, GLSL, Go, Haml, Haskell, Haxe, -Handlebars, HSS, HTML, Java, JavaScript, JSON, JSX, LESS, Lex, Limbo, LISP, -LLVM intermediate language, Lua, MATLAB, NASM, Objective-C, Objective-C++, -OCaml, Perl, Perl POD, PHP, gettext Portable Object, OS X and iOS property -lists, Puppet, Python, Racket, R, reStructuredText, Ruby, SASS/SCSS, Scala, -Slim, Tcl, TeX, Texinfo, Twig, TypeScript, Vala, Verilog, VHDL, VimL, xHtml, -XML, XSLT, YACC, YAML, z80, Zope page templates, and zsh. See the [wiki][3] -for details about the corresponding supported checkers. +Ada, AppleScript, Arduino, AsciiDoc, ASM, BEMHTML, Bro, Bourne shell, C, +C++, C#, Cabal, Chef, CoffeeScript, Coco, Coq, CSS, Cucumber, CUDA, D, Dart, +DocBook, Dust, Elixir, Erlang, eRuby, Fortran, Gentoo metadata, GLSL, Go, +Haml, Haskell, Haxe, Handlebars, HSS, HTML, Java, JavaScript, JSON, JSX, LESS, +Lex, Limbo, LISP, LLVM intermediate language, Lua, MATLAB, NASM, Objective-C, +Objective-C++, OCaml, Perl, Perl POD, PHP, gettext Portable Object, OS X +and iOS property lists, Puppet, Python, Racket, R, reStructuredText, Ruby, +SASS/SCSS, Scala, Slim, Tcl, TeX, Texinfo, Twig, TypeScript, Vala, Verilog, +VHDL, VimL, xHtml, XML, XSLT, YACC, YAML, z80, Zope page templates, and zsh. +See the [wiki][3] for details about the corresponding supported checkers. Below is a screenshot showing the methods that Syntastic uses to display syntax errors. Note that, in practise, you will only have a subset of these methods diff --git a/plugin/syntastic.vim b/plugin/syntastic.vim index 816345af..30c7790c 100644 --- a/plugin/syntastic.vim +++ b/plugin/syntastic.vim @@ -19,7 +19,7 @@ if has('reltime') lockvar! g:syntastic_start endif -let g:syntastic_version = '3.4.0-97' +let g:syntastic_version = '3.4.0-99' lockvar g:syntastic_version " Sanity checks {{{1 diff --git a/plugin/syntastic/registry.vim b/plugin/syntastic/registry.vim index 3ab771e1..0da9d333 100644 --- a/plugin/syntastic/registry.vim +++ b/plugin/syntastic/registry.vim @@ -9,6 +9,7 @@ let s:defaultCheckers = { \ 'actionscript':['mxmlc'], \ 'ada': ['gcc'], \ 'applescript': ['osacompile'], + \ 'arduino': ['avrgcc'], \ 'asciidoc': ['asciidoc'], \ 'asm': ['gcc'], \ 'bro': ['bro'], diff --git a/syntax_checkers/arduino/avrgcc.vim b/syntax_checkers/arduino/avrgcc.vim new file mode 100644 index 00000000..600041aa --- /dev/null +++ b/syntax_checkers/arduino/avrgcc.vim @@ -0,0 +1,26 @@ +"============================================================================ +"File: avrgcc.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Karel +"License: This program is free software. It comes without any warranty, +" to the extent permitted by applicable law. You can redistribute +" it and/or modify it under the terms of the Do What The Fuck You +" Want To Public License, Version 2, as published by Sam Hocevar. +" See http://sam.zoy.org/wtfpl/COPYING for more details. +" +"============================================================================ + +if exists('g:loaded_syntastic_arduino_avrgcc_checker') + finish +endif +let g:loaded_syntastic_arduino_avrgcc_checker = 1 + +runtime! syntax_checkers/c/*.vim + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'c', + \ 'name': 'avrgcc', + \ 'exec': 'avr-gcc' + \ 'redirect': 'c/avrgcc'}) + +" vim: set et sts=4 sw=4: diff --git a/syntax_checkers/c/avrgcc.vim b/syntax_checkers/c/avrgcc.vim index 0efe4722..5563d61d 100644 --- a/syntax_checkers/c/avrgcc.vim +++ b/syntax_checkers/c/avrgcc.vim @@ -53,3 +53,5 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({ let &cpo = s:save_cpo unlet s:save_cpo + +" vim: set et sts=4 sw=4: diff --git a/syntax_checkers/erlang/syntaxerl.vim b/syntax_checkers/erlang/syntaxerl.vim index 903793c3..91629c43 100644 --- a/syntax_checkers/erlang/syntaxerl.vim +++ b/syntax_checkers/erlang/syntaxerl.vim @@ -38,3 +38,5 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({ let &cpo = s:save_cpo unlet s:save_cpo + +" vim: set et sts=4 sw=4: