mirror of
https://github.com/dense-analysis/ale
synced 2024-12-19 04:45:31 +00:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
8af805cefe
@ -1,14 +1,17 @@
|
|||||||
call ale#Set('ruby_sorbet_executable', 'srb')
|
call ale#Set('ruby_sorbet_executable', 'srb')
|
||||||
call ale#Set('ruby_sorbet_options', '')
|
call ale#Set('ruby_sorbet_options', '')
|
||||||
|
call ale#Set('ruby_sorbet_enable_watchman', 0)
|
||||||
|
|
||||||
function! ale_linters#ruby#sorbet#GetCommand(buffer) abort
|
function! ale_linters#ruby#sorbet#GetCommand(buffer) abort
|
||||||
let l:executable = ale#Var(a:buffer, 'ruby_sorbet_executable')
|
let l:executable = ale#Var(a:buffer, 'ruby_sorbet_executable')
|
||||||
let l:options = ale#Var(a:buffer, 'ruby_sorbet_options')
|
let l:options = ale#Var(a:buffer, 'ruby_sorbet_options')
|
||||||
|
let l:enable_watchman = ale#Var(a:buffer, 'ruby_sorbet_enable_watchman')
|
||||||
|
|
||||||
return ale#ruby#EscapeExecutable(l:executable, 'srb')
|
return ale#ruby#EscapeExecutable(l:executable, 'srb')
|
||||||
\ . ' tc'
|
\ . ' tc'
|
||||||
\ . (!empty(l:options) ? ' ' . l:options : '')
|
\ . (!empty(l:options) ? ' ' . l:options : '')
|
||||||
\ . ' --lsp --disable-watchman'
|
\ . ' --lsp'
|
||||||
|
\ . (l:enable_watchman ? '' : ' --disable-watchman')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
call ale#linter#Define('ruby', {
|
call ale#linter#Define('ruby', {
|
||||||
|
@ -177,6 +177,16 @@ g:ale_ruby_sorbet_options *g:ale_ruby_sorbet_options*
|
|||||||
This variable can be changed to modify flags given to sorbet.
|
This variable can be changed to modify flags given to sorbet.
|
||||||
|
|
||||||
|
|
||||||
|
g:ale_ruby_sorbet_enable_watchman *g:ale_ruby_sorbet_enable_watchman*
|
||||||
|
*b:ale_ruby_sorbet_enable_watchman*
|
||||||
|
Type: |Number|
|
||||||
|
Default: `0`
|
||||||
|
|
||||||
|
Whether or not to use watchman to let the LSP server to know about changes
|
||||||
|
to files from outside of vim. Defaults to disable watchman because it
|
||||||
|
requires watchman to be installed separately from sorbet.
|
||||||
|
|
||||||
|
|
||||||
===============================================================================
|
===============================================================================
|
||||||
standardrb *ale-ruby-standardrb*
|
standardrb *ale-ruby-standardrb*
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@ Before:
|
|||||||
|
|
||||||
let g:ale_ruby_sorbet_executable = 'srb'
|
let g:ale_ruby_sorbet_executable = 'srb'
|
||||||
let g:ale_ruby_sorbet_options = ''
|
let g:ale_ruby_sorbet_options = ''
|
||||||
|
let g:ale_ruby_sorbet_enable_watchman = 0
|
||||||
|
|
||||||
After:
|
After:
|
||||||
call ale#assert#TearDownLinterTest()
|
call ale#assert#TearDownLinterTest()
|
||||||
@ -13,6 +14,12 @@ Execute(Executable should default to srb):
|
|||||||
AssertLinter 'srb', ale#Escape('srb')
|
AssertLinter 'srb', ale#Escape('srb')
|
||||||
\ . ' tc --lsp --disable-watchman'
|
\ . ' tc --lsp --disable-watchman'
|
||||||
|
|
||||||
|
Execute(Able to enable watchman):
|
||||||
|
let g:ale_ruby_sorbet_enable_watchman = 1
|
||||||
|
|
||||||
|
AssertLinter 'srb', ale#Escape('srb')
|
||||||
|
\ . ' tc --lsp'
|
||||||
|
|
||||||
Execute(Should be able to set a custom executable):
|
Execute(Should be able to set a custom executable):
|
||||||
let g:ale_ruby_sorbet_executable = 'bin/srb'
|
let g:ale_ruby_sorbet_executable = 'bin/srb'
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user