mirror of
https://github.com/amix/vimrc
synced 2025-07-21 11:54:59 +08:00
merge
This commit is contained in:
@ -0,0 +1,22 @@
|
||||
"============================================================================
|
||||
"File: mixedindentlint.vim
|
||||
"Description: Mixed indentation linter for vim
|
||||
"Maintainer: Payton Swick <payton@foolord.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://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
"============================================================================
|
||||
|
||||
if exists('g:loaded_syntastic_scss_mixedindentlint_checker')
|
||||
finish
|
||||
endif
|
||||
let g:loaded_syntastic_scss_mixedindentlint_checker = 1
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'scss',
|
||||
\ 'name': 'mixedindentlint',
|
||||
\ 'redirect': 'javascript/mixedindentlint'})
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
@ -10,16 +10,14 @@
|
||||
"
|
||||
"============================================================================
|
||||
|
||||
if exists("g:loaded_syntastic_scss_sass_checker")
|
||||
if exists('g:loaded_syntastic_scss_sass_checker')
|
||||
finish
|
||||
endif
|
||||
let g:loaded_syntastic_scss_sass_checker = 1
|
||||
|
||||
runtime! syntax_checkers/sass/*.vim
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'scss',
|
||||
\ 'name': 'sass',
|
||||
\ 'redirect': 'sass/sass'})
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -0,0 +1,23 @@
|
||||
"============================================================================
|
||||
"File: sass_lint.vim
|
||||
"Description: Syntax checking plugin for syntastic
|
||||
"Maintainer: LCD 47 <lcd047 at gmail dot 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://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
"
|
||||
"============================================================================
|
||||
|
||||
if exists('g:loaded_syntastic_scss_sass_lint_checker')
|
||||
finish
|
||||
endif
|
||||
let g:loaded_syntastic_scss_sass_lint_checker = 1
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'scss',
|
||||
\ 'name': 'sass_lint',
|
||||
\ 'redirect': 'sass/sass_lint'})
|
||||
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
@ -10,16 +10,14 @@
|
||||
"
|
||||
"============================================================================
|
||||
|
||||
if exists("g:loaded_syntastic_scss_sassc_checker")
|
||||
if exists('g:loaded_syntastic_scss_sassc_checker')
|
||||
finish
|
||||
endif
|
||||
let g:loaded_syntastic_scss_sassc_checker = 1
|
||||
|
||||
runtime! syntax_checkers/sass/*.vim
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'scss',
|
||||
\ 'name': 'sassc',
|
||||
\ 'redirect': 'sass/sassc'})
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -9,7 +9,7 @@
|
||||
" See http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
"============================================================================
|
||||
|
||||
if exists("g:loaded_syntastic_scss_scss_lint_checker")
|
||||
if exists('g:loaded_syntastic_scss_scss_lint_checker')
|
||||
finish
|
||||
endif
|
||||
let g:loaded_syntastic_scss_scss_lint_checker = 1
|
||||
@ -21,21 +21,36 @@ function! SyntaxCheckers_scss_scss_lint_IsAvailable() dict
|
||||
if !executable(self.getExec())
|
||||
return 0
|
||||
endif
|
||||
|
||||
let ver = syntastic#util#getVersion(self.getExecEscaped() . ' --version')
|
||||
call self.log(self.getExec() . ' version =', ver)
|
||||
|
||||
return syntastic#util#versionIsAtLeast(ver, [0, 12])
|
||||
return syntastic#util#versionIsAtLeast(self.getVersion(), [0, 29])
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_scss_scss_lint_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({})
|
||||
let errorformat = '%f:%l [%t] %m'
|
||||
return SyntasticMake({
|
||||
let makeprg = self.makeprgBuild({ 'args_after': '-f JSON' })
|
||||
|
||||
let errorformat = '%f:%t:%l:%c:%n:%m'
|
||||
|
||||
let loclist = SyntasticMake({
|
||||
\ 'makeprg': makeprg,
|
||||
\ 'errorformat': errorformat,
|
||||
\ 'subtype': 'Style',
|
||||
\ 'preprocess': 'scss_lint',
|
||||
\ 'postprocess': ['guards'],
|
||||
\ 'returns': [0, 1, 2, 65, 66] })
|
||||
|
||||
let cutoff = strlen('Syntax Error: ')
|
||||
for e in loclist
|
||||
if e['nr'] > 1
|
||||
let e['hl'] = '\%>' . (e['col'] - 1) . 'c\%<' . (e['col'] + e['nr']) . 'c'
|
||||
endif
|
||||
let e['nr'] = 0
|
||||
|
||||
if e['text'][: cutoff-1] ==# 'Syntax Error: '
|
||||
let e['text'] = e['text'][cutoff :]
|
||||
else
|
||||
let e['subtype'] = 'Style'
|
||||
endif
|
||||
endfor
|
||||
|
||||
return loclist
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
@ -46,4 +61,4 @@ call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
" vim: set et sts=4 sw=4:
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
||||
|
@ -0,0 +1,23 @@
|
||||
"============================================================================
|
||||
"File: stylelint.vim
|
||||
"Description: Syntax checking plugin for syntastic.vim
|
||||
"Maintainer: LCD 47 <lcd047 at gmail dot 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://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
"
|
||||
"============================================================================
|
||||
|
||||
if exists('g:loaded_syntastic_scss_stylelint_checker')
|
||||
finish
|
||||
endif
|
||||
let g:loaded_syntastic_scss_stylelint_checker = 1
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'scss',
|
||||
\ 'name': 'stylelint',
|
||||
\ 'redirect': 'css/stylelint'})
|
||||
|
||||
" vim: set sw=4 sts=4 et fdm=marker:
|
Reference in New Issue
Block a user