mirror of
https://github.com/dense-analysis/ale.git
synced 2026-01-09 04:52:29 +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:
@@ -8,6 +8,12 @@ Execute(The default executable path should be correct):
|
||||
AssertLinter 'phpactor',
|
||||
\ ale#Escape('phpactor') . ' language-server'
|
||||
|
||||
Execute(Overriding the executable should work):
|
||||
let b:ale_php_phpactor_executable = 'my_phpactor'
|
||||
|
||||
AssertLinter 'my_phpactor', ale#Escape('my_phpactor') . ' language-server'
|
||||
unlet b:ale_php_phpactor_executable
|
||||
|
||||
Execute(The project path should be correct for .git directories):
|
||||
call ale#test#SetFilename('../test-files/php/with-git/test.php')
|
||||
silent! call mkdir('../test-files/php/with-git/.git')
|
||||
@@ -18,3 +24,20 @@ Execute(The project path should be correct for composer.json file):
|
||||
call ale#test#SetFilename('../test-files/php/with-composer/test.php')
|
||||
|
||||
AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/php/with-composer')
|
||||
|
||||
Execute(The LSP values should be set correctly):
|
||||
|
||||
AssertLSPLanguage 'php'
|
||||
|
||||
AssertLSPOptions {}
|
||||
|
||||
AssertLSPConfig {}
|
||||
|
||||
Execute(Should accept initialization options):
|
||||
let b:ale_php_phpactor_init_options = {
|
||||
\ 'language_server_phpstan.enabled': v:false,
|
||||
\ }
|
||||
|
||||
AssertLSPOptions {
|
||||
\ 'language_server_phpstan.enabled': v:false,
|
||||
\ }
|
||||
|
||||
Reference in New Issue
Block a user