mirror of
https://github.com/amix/vimrc
synced 2025-07-09 10:45:00 +08:00
Use sources_non_forked folder for pathogen path, with sources_non_forked_fallback folder as fallback.
This commit is contained in:
@ -1,25 +0,0 @@
|
||||
" Author: pylipp (www.github.com/pylipp)
|
||||
" Description: qmlfmt for QML files
|
||||
|
||||
call ale#Set('qml_qmlfmt_executable', 'qmlfmt')
|
||||
|
||||
" Find lines like
|
||||
" Error:11:1: Expected token `}'
|
||||
function! ale_linters#qml#qmlfmt#Handle(buffer, lines) abort
|
||||
let l:pattern = '\v^(Error|Warning):(\d+):(\d+): (.+)$'
|
||||
|
||||
return map(ale#util#GetMatches(a:lines, l:pattern), "{
|
||||
\ 'lnum': v:val[2] + 0,
|
||||
\ 'col': v:val[3] + 0,
|
||||
\ 'text': v:val[4],
|
||||
\ 'type': v:val[1] is# 'Warning' ? 'W' : 'E',
|
||||
\}")
|
||||
endfunction
|
||||
|
||||
call ale#linter#Define('qml', {
|
||||
\ 'name': 'qmlfmt',
|
||||
\ 'output_stream': 'stderr',
|
||||
\ 'executable': {b -> ale#Var(b, 'qml_qmlfmt_executable')},
|
||||
\ 'command': '%e -e',
|
||||
\ 'callback': 'ale_linters#qml#qmlfmt#Handle',
|
||||
\})
|
@ -1,29 +0,0 @@
|
||||
" Author: pylipp (www.github.com/pylipp)
|
||||
" Description: qmllint for QML files
|
||||
|
||||
" Find lines like
|
||||
" /home/foo_user42/code-base/qml/Screen.qml:11 : Expected token `}'
|
||||
function! ale_linters#qml#qmllint#Handle(buffer, lines) abort
|
||||
let l:pattern = '\v^[/_-a-zA-z0-9\. ]+:(\d+) : (.*)$'
|
||||
let l:output = []
|
||||
|
||||
for l:match in ale#util#GetMatches(a:lines, l:pattern)
|
||||
let l:item = {
|
||||
\ 'lnum': l:match[1] + 0,
|
||||
\ 'col': 0,
|
||||
\ 'text': l:match[2],
|
||||
\ 'type': 'E',
|
||||
\}
|
||||
call add(l:output, l:item)
|
||||
endfor
|
||||
|
||||
return l:output
|
||||
endfunction
|
||||
|
||||
call ale#linter#Define('qml', {
|
||||
\ 'name': 'qmllint',
|
||||
\ 'output_stream': 'stderr',
|
||||
\ 'executable': 'qmllint',
|
||||
\ 'command': 'qmllint %t',
|
||||
\ 'callback': 'ale_linters#qml#qmllint#Handle',
|
||||
\})
|
Reference in New Issue
Block a user