mirror of
https://github.com/dense-analysis/ale.git
synced 2026-08-12 10:52:32 +08:00
support running solargraph via bundle (#5097)
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
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
This commit is contained in:
@@ -8,7 +8,10 @@ call ale#Set('ruby_solargraph_executable', 'solargraph')
|
|||||||
call ale#Set('ruby_solargraph_options', {})
|
call ale#Set('ruby_solargraph_options', {})
|
||||||
|
|
||||||
function! ale_linters#ruby#solargraph#GetCommand(buffer) abort
|
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
|
endfunction
|
||||||
|
|
||||||
call ale#linter#Define('ruby', {
|
call ale#linter#Define('ruby', {
|
||||||
|
|||||||
+2
-2
@@ -227,8 +227,8 @@ g:ale_ruby_solargraph_executable
|
|||||||
Type: |String|
|
Type: |String|
|
||||||
Default: `'solargraph'`
|
Default: `'solargraph'`
|
||||||
|
|
||||||
Override the invoked solargraph binary. This is useful for running solargraph
|
Override the invoked solargraph binary. Set this to `'bundle'` to invoke
|
||||||
from binstubs or a bundle.
|
`'bundle` `exec` solargraph'.
|
||||||
|
|
||||||
|
|
||||||
===============================================================================
|
===============================================================================
|
||||||
|
|||||||
@@ -13,6 +13,13 @@ Execute(command callback executable can be overridden):
|
|||||||
let g:ale_ruby_solargraph_executable = 'foobar'
|
let g:ale_ruby_solargraph_executable = 'foobar'
|
||||||
AssertLinter 'foobar', ale#Escape('foobar') . ' stdio'
|
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):
|
Execute(should set solargraph for rails app):
|
||||||
call ale#test#SetFilename('../test-files/ruby/valid_rails_app/app/models/thing.rb')
|
call ale#test#SetFilename('../test-files/ruby/valid_rails_app/app/models/thing.rb')
|
||||||
AssertLSPLanguage 'ruby'
|
AssertLSPLanguage 'ruby'
|
||||||
|
|||||||
Reference in New Issue
Block a user