mirror of
https://github.com/amix/vimrc
synced 2025-07-12 22:24:59 +08:00
Update ui_glue.vim, lightline.txt, and 333 more files...
This commit is contained in:
@ -18,15 +18,15 @@ function! ale_linters#php#intelephense#GetProjectRoot(buffer) abort
|
||||
return !empty(l:git_path) ? fnamemodify(l:git_path, ':h:h') : ''
|
||||
endfunction
|
||||
|
||||
function! ale_linters#php#intelephense#GetInitializationOptions() abort
|
||||
return ale#Get('php_intelephense_config')
|
||||
function! ale_linters#php#intelephense#GetInitializationOptions(buffer) abort
|
||||
return ale#Var(a:buffer, 'php_intelephense_config')
|
||||
endfunction
|
||||
|
||||
call ale#linter#Define('php', {
|
||||
\ 'name': 'intelephense',
|
||||
\ 'lsp': 'stdio',
|
||||
\ 'initialization_options': function('ale_linters#php#intelephense#GetInitializationOptions'),
|
||||
\ 'executable': {b -> ale#node#FindExecutable(b, 'php_intelephense', [])},
|
||||
\ 'executable': {b -> ale#path#FindExecutable(b, 'php_intelephense', [])},
|
||||
\ 'command': '%e --stdio',
|
||||
\ 'project_root': function('ale_linters#php#intelephense#GetProjectRoot'),
|
||||
\})
|
||||
|
@ -19,7 +19,7 @@ endfunction
|
||||
call ale#linter#Define('php', {
|
||||
\ 'name': 'langserver',
|
||||
\ 'lsp': 'stdio',
|
||||
\ 'executable': {b -> ale#node#FindExecutable(b, 'php_langserver', [
|
||||
\ 'executable': {b -> ale#path#FindExecutable(b, 'php_langserver', [
|
||||
\ 'vendor/bin/php-language-server.php',
|
||||
\ ])},
|
||||
\ 'command': 'php %e',
|
||||
|
@ -39,7 +39,7 @@ function! ale_linters#php#phan#Handle(buffer, lines) abort
|
||||
let l:pattern = '^Phan error: \(\w\+\): \(.\+\) in \(.\+\) on line \(\d\+\)$'
|
||||
else
|
||||
" /path/to/some-filename.php:18 ERRORTYPE message
|
||||
let l:pattern = '^.*:\(\d\+\)\s\(\w\+\)\s\(.\+\)$'
|
||||
let l:pattern = '^\(.*\):\(\d\+\)\s\(\w\+\)\s\(.\+\)$'
|
||||
endif
|
||||
|
||||
let l:output = []
|
||||
@ -49,13 +49,15 @@ function! ale_linters#php#phan#Handle(buffer, lines) abort
|
||||
let l:dict = {
|
||||
\ 'lnum': l:match[4] + 0,
|
||||
\ 'text': l:match[2],
|
||||
\ 'filename': l:match[3],
|
||||
\ 'type': 'W',
|
||||
\}
|
||||
else
|
||||
let l:dict = {
|
||||
\ 'lnum': l:match[1] + 0,
|
||||
\ 'text': l:match[3],
|
||||
\ 'lnum': l:match[2] + 0,
|
||||
\ 'text': l:match[4],
|
||||
\ 'type': 'W',
|
||||
\ 'filename': l:match[1],
|
||||
\}
|
||||
endif
|
||||
|
||||
|
@ -13,8 +13,7 @@ function! ale_linters#php#phpcs#GetCommand(buffer) abort
|
||||
\ ? '--standard=' . ale#Escape(l:standard)
|
||||
\ : ''
|
||||
|
||||
return ale#path#BufferCdString(a:buffer)
|
||||
\ . '%e -s --report=emacs --stdin-path=%s'
|
||||
return '%e -s --report=emacs --stdin-path=%s'
|
||||
\ . ale#Pad(l:standard_option)
|
||||
\ . ale#Pad(ale#Var(a:buffer, 'php_phpcs_options'))
|
||||
endfunction
|
||||
@ -45,10 +44,11 @@ endfunction
|
||||
|
||||
call ale#linter#Define('php', {
|
||||
\ 'name': 'phpcs',
|
||||
\ 'executable': {b -> ale#node#FindExecutable(b, 'php_phpcs', [
|
||||
\ 'executable': {b -> ale#path#FindExecutable(b, 'php_phpcs', [
|
||||
\ 'vendor/bin/phpcs',
|
||||
\ 'phpcs'
|
||||
\ ])},
|
||||
\ 'cwd': '%s:h',
|
||||
\ 'command': function('ale_linters#php#phpcs#GetCommand'),
|
||||
\ 'callback': 'ale_linters#php#phpcs#Handle',
|
||||
\})
|
||||
|
@ -18,7 +18,7 @@ endfunction
|
||||
call ale#linter#Define('php', {
|
||||
\ 'name': 'psalm',
|
||||
\ 'lsp': 'stdio',
|
||||
\ 'executable': {b -> ale#node#FindExecutable(b, 'php_psalm', [
|
||||
\ 'executable': {b -> ale#path#FindExecutable(b, 'php_psalm', [
|
||||
\ 'vendor/bin/psalm',
|
||||
\ ])},
|
||||
\ 'command': function('ale_linters#php#psalm#GetCommand'),
|
||||
|
@ -20,7 +20,7 @@ function! ale_linters#php#tlint#GetProjectRoot(buffer) abort
|
||||
endfunction
|
||||
|
||||
function! ale_linters#php#tlint#GetExecutable(buffer) abort
|
||||
return ale#node#FindExecutable(a:buffer, 'php_tlint', [
|
||||
return ale#path#FindExecutable(a:buffer, 'php_tlint', [
|
||||
\ 'vendor/bin/tlint',
|
||||
\ 'tlint',
|
||||
\])
|
||||
|
Reference in New Issue
Block a user