mirror of
https://github.com/dense-analysis/ale.git
synced 2026-02-19 08:14:21 +08:00
support running solargraph via bundle (#5097)
Some checks are pending
CI / build_image (push) Waiting to run
CI / test_ale (--linters-only) (push) Blocked by required conditions
CI / test_ale (--lua-only) (push) Blocked by required conditions
CI / test_ale (--neovim-07-only) (push) Blocked by required conditions
CI / test_ale (--neovim-08-only) (push) Blocked by required conditions
CI / test_ale (--vim-80-only) (push) Blocked by required conditions
CI / test_ale (--vim-90-only) (push) Blocked by required conditions
Some checks are pending
CI / build_image (push) Waiting to run
CI / test_ale (--linters-only) (push) Blocked by required conditions
CI / test_ale (--lua-only) (push) Blocked by required conditions
CI / test_ale (--neovim-07-only) (push) Blocked by required conditions
CI / test_ale (--neovim-08-only) (push) Blocked by required conditions
CI / test_ale (--vim-80-only) (push) Blocked by required conditions
CI / test_ale (--vim-90-only) (push) Blocked by required conditions
This commit is contained in:
@@ -8,7 +8,10 @@ call ale#Set('ruby_solargraph_executable', 'solargraph')
|
||||
call ale#Set('ruby_solargraph_options', {})
|
||||
|
||||
function! ale_linters#ruby#solargraph#GetCommand(buffer) abort
|
||||
return '%e' . ale#Pad('stdio')
|
||||
let l:executable = ale#Var(a:buffer, 'ruby_solargraph_executable')
|
||||
|
||||
return ale#ruby#EscapeExecutable(l:executable, 'solargraph')
|
||||
\ . ale#Pad('stdio')
|
||||
endfunction
|
||||
|
||||
call ale#linter#Define('ruby', {
|
||||
|
||||
@@ -227,8 +227,8 @@ g:ale_ruby_solargraph_executable
|
||||
Type: |String|
|
||||
Default: `'solargraph'`
|
||||
|
||||
Override the invoked solargraph binary. This is useful for running solargraph
|
||||
from binstubs or a bundle.
|
||||
Override the invoked solargraph binary. Set this to `'bundle'` to invoke
|
||||
`'bundle` `exec` solargraph'.
|
||||
|
||||
|
||||
===============================================================================
|
||||
|
||||
@@ -13,6 +13,13 @@ Execute(command callback executable can be overridden):
|
||||
let g:ale_ruby_solargraph_executable = 'foobar'
|
||||
AssertLinter 'foobar', ale#Escape('foobar') . ' stdio'
|
||||
|
||||
Execute(Setting bundle appends 'exec solargraph'):
|
||||
let g:ale_ruby_solargraph_executable = 'path to/bundle'
|
||||
|
||||
AssertLinter 'path to/bundle', ale#Escape('path to/bundle')
|
||||
\ . ' exec solargraph'
|
||||
\ . ' stdio'
|
||||
|
||||
Execute(should set solargraph for rails app):
|
||||
call ale#test#SetFilename('../test-files/ruby/valid_rails_app/app/models/thing.rb')
|
||||
AssertLSPLanguage 'ruby'
|
||||
|
||||
Reference in New Issue
Block a user