Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

Support for the renaming of Jade to Pug #1704

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Ada, Ansible configurations, API Blueprint, AppleScript, AsciiDoc, ASM,
BEMHTML, Bro, Bourne shell, C, C++, C#, Cabal, Chef, CoffeeScript, Coco, Coq,
CSS, Cucumber, CUDA, D, Dart, DocBook, Dockerfile, Dust, Elixir, Erlang,
eRuby, Fortran, Gentoo metadata, GLSL, Go, Haml, Haskell, Haxe, Handlebars,
HSS, HTML, Jade, Java, JavaScript, JSON, JSX, LESS, Lex, Limbo, LISP, LLVM
HSS, HTML, Jade/Pug, Java, JavaScript, JSON, JSX, LESS, Lex, Limbo, LISP, LLVM
intermediate language, Lua, Markdown, MATLAB, Mercury, NASM, Nix, Objective-C,
Objective-C++, OCaml, Perl, Perl POD, PHP, gettext Portable Object, OS X and
iOS property lists, Puppet, Python, QML, R, Racket, Relax NG, reStructuredText,
Expand Down
1 change: 1 addition & 0 deletions plugin/syntastic/registry.vim
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ let s:_DEFAULT_CHECKERS = {
\ 'hss': ['hss'],
\ 'html': ['tidy'],
\ 'jade': ['jade_lint'],
\ 'pug': ['pug_lint'],
\ 'java': ['javac'],
\ 'javascript': ['jshint', 'jslint'],
\ 'json': ['jsonlint', 'jsonval'],
Expand Down
41 changes: 41 additions & 0 deletions syntax_checkers/pug/pug_lint.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
"============================================================================
"File: pug_lint.vim
"Description: Syntax checking plugin for syntastic.vim
"Maintainer: Kevin Olson <acidjazz@gmail.com>
"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://www.wtfpl.net/txt/copying/ for more details.
"
"============================================================================

if exists('g:loaded_syntastic_pug_pug_lint_checker')
finish
endif
let g:loaded_syntastic_pug_pug_lint_checker = 1

let s:save_cpo = &cpo
set cpo&vim

function! SyntaxCheckers_pug_pug_lint_GetLocList() dict
let makeprg = self.makeprgBuild({ 'args_after': '-r inline' })

let errorformat = '%f:%l:%c %m'

return SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat,
\ 'returns': [0, 2] })
endfunction

" need to eventually change for when jade-lint is renamed
call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'pug',
\ 'name': 'pug_lint',
\ 'exec': 'jade-lint' })

let &cpo = s:save_cpo
unlet s:save_cpo

" vim: set sw=4 sts=4 et fdm=marker: