mirror of
https://github.com/amix/vimrc
synced 2025-07-14 15:34:59 +08:00
😼 Update plugins
This commit is contained in:
16
sources_non_forked/ale/ale_linters/json/eslint.vim
Normal file
16
sources_non_forked/ale/ale_linters/json/eslint.vim
Normal file
@ -0,0 +1,16 @@
|
||||
" Author: João Pesce <joao@pesce.cc>
|
||||
" Description: eslint for JSON files.
|
||||
"
|
||||
" Requires eslint-plugin-jsonc or a similar plugin to work
|
||||
"
|
||||
" Uses the same funtcions as ale_linters/javascript/eslint.vim by w0rp
|
||||
" <devw0rp@gmail.com>
|
||||
|
||||
call ale#linter#Define('json', {
|
||||
\ 'name': 'eslint',
|
||||
\ 'output_stream': 'both',
|
||||
\ 'executable': function('ale#handlers#eslint#GetExecutable'),
|
||||
\ 'cwd': function('ale#handlers#eslint#GetCwd'),
|
||||
\ 'command': function('ale#handlers#eslint#GetCommand'),
|
||||
\ 'callback': 'ale#handlers#eslint#HandleJSON',
|
||||
\})
|
16
sources_non_forked/ale/ale_linters/json5/eslint.vim
Normal file
16
sources_non_forked/ale/ale_linters/json5/eslint.vim
Normal file
@ -0,0 +1,16 @@
|
||||
" Author: João Pesce <joao@pesce.cc>
|
||||
" Description: eslint for JSON5 files.
|
||||
"
|
||||
" Requires eslint-plugin-jsonc or a similar plugin to work
|
||||
"
|
||||
" Uses the same funtcions as ale_linters/javascript/eslint.vim by w0rp
|
||||
" <devw0rp@gmail.com>
|
||||
|
||||
call ale#linter#Define('json5', {
|
||||
\ 'name': 'eslint',
|
||||
\ 'output_stream': 'both',
|
||||
\ 'executable': function('ale#handlers#eslint#GetExecutable'),
|
||||
\ 'cwd': function('ale#handlers#eslint#GetCwd'),
|
||||
\ 'command': function('ale#handlers#eslint#GetCommand'),
|
||||
\ 'callback': 'ale#handlers#eslint#HandleJSON',
|
||||
\})
|
16
sources_non_forked/ale/ale_linters/jsonc/eslint.vim
Normal file
16
sources_non_forked/ale/ale_linters/jsonc/eslint.vim
Normal file
@ -0,0 +1,16 @@
|
||||
" Author: João Pesce <joao@pesce.cc>
|
||||
" Description: eslint for JSONC files.
|
||||
"
|
||||
" Requires eslint-plugin-jsonc or a similar plugin to work
|
||||
"
|
||||
" Uses the same funtcions as ale_linters/javascript/eslint.vim by w0rp
|
||||
" <devw0rp@gmail.com>
|
||||
|
||||
call ale#linter#Define('jsonc', {
|
||||
\ 'name': 'eslint',
|
||||
\ 'output_stream': 'both',
|
||||
\ 'executable': function('ale#handlers#eslint#GetExecutable'),
|
||||
\ 'cwd': function('ale#handlers#eslint#GetCwd'),
|
||||
\ 'command': function('ale#handlers#eslint#GetCommand'),
|
||||
\ 'callback': 'ale#handlers#eslint#HandleJSON',
|
||||
\})
|
@ -1,4 +1,4 @@
|
||||
" Author: Vincent (wahrwolf [ät] wolfpit.net)
|
||||
" Author: Vincent (wahrwolf [at] wolfpit.net)
|
||||
" Description: languagetool for mails
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
" Author: Vincent (wahrwolf [ät] wolfpit.net)
|
||||
" Author: Vincent (wahrwolf [at] wolfpit.net)
|
||||
" Description: languagetool for markdown files
|
||||
|
||||
|
||||
|
@ -22,14 +22,17 @@ endfunction
|
||||
|
||||
function! ale_linters#python#pyre#GetCommand(buffer) abort
|
||||
let l:executable = ale_linters#python#pyre#GetExecutable(a:buffer)
|
||||
|
||||
let l:exec_args = l:executable =~? 'pipenv\|poetry$'
|
||||
\ ? ' run pyre persistent'
|
||||
\ : ' persistent'
|
||||
let l:exec_args = (l:executable =~? 'pipenv\|poetry$' ? ' run pyre' : '') . ' persistent'
|
||||
|
||||
return ale#Escape(l:executable) . l:exec_args
|
||||
endfunction
|
||||
|
||||
function! ale_linters#python#pyre#GetCwd(buffer) abort
|
||||
let l:local_config = ale#path#FindNearestFile(a:buffer, '.pyre_configuration.local')
|
||||
|
||||
return fnamemodify(l:local_config, ':h')
|
||||
endfunction
|
||||
|
||||
call ale#linter#Define('python', {
|
||||
\ 'name': 'pyre',
|
||||
\ 'lsp': 'stdio',
|
||||
@ -37,4 +40,5 @@ call ale#linter#Define('python', {
|
||||
\ 'command': function('ale_linters#python#pyre#GetCommand'),
|
||||
\ 'project_root': function('ale#python#FindProjectRoot'),
|
||||
\ 'completion_filter': 'ale#completion#python#CompletionItemFilter',
|
||||
\ 'cwd': function('ale_linters#python#pyre#GetCwd'),
|
||||
\})
|
||||
|
46
sources_non_forked/ale/ale_linters/robot/rflint.vim
Normal file
46
sources_non_forked/ale/ale_linters/robot/rflint.vim
Normal file
@ -0,0 +1,46 @@
|
||||
" Author: Samuel Branisa <branisa.samuel@icloud.com>
|
||||
" Description: rflint linting for robot framework files
|
||||
|
||||
call ale#Set('robot_rflint_executable', 'rflint')
|
||||
|
||||
function! ale_linters#robot#rflint#GetExecutable(buffer) abort
|
||||
return ale#Var(a:buffer, 'robot_rflint_executable')
|
||||
endfunction
|
||||
|
||||
function! ale_linters#robot#rflint#GetCommand(buffer) abort
|
||||
let l:executable = ale_linters#robot#rflint#GetExecutable(a:buffer)
|
||||
let l:flags = '--format'
|
||||
\ . ' "{filename}:{severity}:{linenumber}:{char}:{rulename}:{message}"'
|
||||
|
||||
return l:executable
|
||||
\ . ' '
|
||||
\ . l:flags
|
||||
\ . ' %s'
|
||||
endfunction
|
||||
|
||||
function! ale_linters#robot#rflint#Handle(buffer, lines) abort
|
||||
let l:pattern = '\v^([[:alnum:][:punct:]]+):(W|E):([[:digit:]]+):([[:digit:]]+):([[:alnum:]]+):(.*)$'
|
||||
let l:output = []
|
||||
|
||||
for l:match in ale#util#GetMatches(a:lines, l:pattern)
|
||||
call add(l:output, {
|
||||
\ 'bufnr': a:buffer,
|
||||
\ 'filename': l:match[1],
|
||||
\ 'type': l:match[2],
|
||||
\ 'lnum': str2nr(l:match[3]),
|
||||
\ 'col': str2nr(l:match[4]),
|
||||
\ 'text': l:match[5],
|
||||
\ 'detail': l:match[6],
|
||||
\})
|
||||
endfor
|
||||
|
||||
return l:output
|
||||
endfunction
|
||||
|
||||
call ale#linter#Define('robot', {
|
||||
\ 'name': 'rflint',
|
||||
\ 'executable': function('ale_linters#robot#rflint#GetExecutable'),
|
||||
\ 'command': function('ale_linters#robot#rflint#GetCommand'),
|
||||
\ 'callback': 'ale_linters#robot#rflint#Handle',
|
||||
\})
|
||||
|
@ -13,9 +13,9 @@ endfunction
|
||||
function! ale_linters#thrift#thriftcheck#Handle(buffer, lines) abort
|
||||
" Matches lines like the following:
|
||||
"
|
||||
" file.thrift:1:1:error: "py" namespace must match "^idl\\." (namespace.pattern)
|
||||
" file.thrift:3:5:warning: 64-bit integer constant -2147483649 may not work in all languages (int.64bit)
|
||||
let l:pattern = '\v^[a-zA-Z]?:?[^:]+:(\d+):(\d+):(\l+): (.*) \((.*)\)$'
|
||||
" file.thrift:1:1: error: "py" namespace must match "^idl\\." (namespace.pattern)
|
||||
" file.thrift:3:5: warning: 64-bit integer constant -2147483649 may not work in all languages (int.64bit)
|
||||
let l:pattern = '\v^[a-zA-Z]?:?[^:]+:(\d+):(\d+): ?([^:]+): (.+) \(([^\)]+)\)$'
|
||||
|
||||
let l:output = []
|
||||
|
||||
|
Reference in New Issue
Block a user