mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-06 12:44:23 +08:00
Make phpactor configurable and documented (#5027)
Some checks failed
CI / build_image (push) Has been cancelled
CI / test_ale (--linters-only) (push) Has been cancelled
CI / test_ale (--lua-only) (push) Has been cancelled
CI / test_ale (--neovim-07-only) (push) Has been cancelled
CI / test_ale (--neovim-08-only) (push) Has been cancelled
CI / test_ale (--vim-80-only) (push) Has been cancelled
CI / test_ale (--vim-90-only) (push) Has been cancelled
Some checks failed
CI / build_image (push) Has been cancelled
CI / test_ale (--linters-only) (push) Has been cancelled
CI / test_ale (--lua-only) (push) Has been cancelled
CI / test_ale (--neovim-07-only) (push) Has been cancelled
CI / test_ale (--neovim-08-only) (push) Has been cancelled
CI / test_ale (--vim-80-only) (push) Has been cancelled
CI / test_ale (--vim-90-only) (push) Has been cancelled
Add php_phpactor_executable for phpactor and make it configurable
through php_phpactor_config.
When phpactor was first added in 3b8ff65, it had no configuration. Thus
the documentation for it could be completely blank. That is why it now
seems like an initial addition
Co-authored-by: cos <cos>
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
" Author: Arizard <https://github.com/Arizard>
|
||||
" Description: PHPactor integration for ALE
|
||||
|
||||
call ale#Set('php_phpactor_executable', 'phpactor')
|
||||
call ale#Set('php_phpactor_init_options', {})
|
||||
|
||||
" Copied from langserver.vim
|
||||
function! ale_linters#php#phpactor#GetProjectRoot(buffer) abort
|
||||
let l:composer_path = ale#path#FindNearestFile(a:buffer, 'composer.json')
|
||||
@@ -17,7 +20,8 @@ endfunction
|
||||
call ale#linter#Define('php', {
|
||||
\ 'name': 'phpactor',
|
||||
\ 'lsp': 'stdio',
|
||||
\ 'executable': 'phpactor',
|
||||
\ 'executable': {b -> ale#Var(b, 'php_phpactor_executable')},
|
||||
\ 'command': '%e language-server',
|
||||
\ 'initialization_options': {b -> ale#Var(b, 'php_phpactor_init_options')},
|
||||
\ 'project_root': function('ale_linters#php#phpactor#GetProjectRoot'),
|
||||
\})
|
||||
|
||||
Reference in New Issue
Block a user