mirror of
https://github.com/amix/vimrc
synced 2025-06-16 01:25:00 +08:00
Updated plugins
This commit is contained in:
23
sources_non_forked/ale/ale_linters/reason/ls.vim
Normal file
23
sources_non_forked/ale/ale_linters/reason/ls.vim
Normal file
@ -0,0 +1,23 @@
|
||||
" Author: David Buchan-Swanson <github@deecewan.com>
|
||||
" Description: Integrate ALE with reason-language-server.
|
||||
|
||||
call ale#Set('reason_ls_executable', '')
|
||||
|
||||
function! ale_linters#reason#ls#FindProjectRoot(buffer) abort
|
||||
let l:reason_config = ale#path#FindNearestFile(a:buffer, 'bsconfig.json')
|
||||
|
||||
if !empty(l:reason_config)
|
||||
return fnamemodify(l:reason_config, ':h')
|
||||
endif
|
||||
|
||||
return ''
|
||||
endfunction
|
||||
|
||||
call ale#linter#Define('reason', {
|
||||
\ 'name': 'reason-language-server',
|
||||
\ 'lsp': 'stdio',
|
||||
\ 'executable': {buffer -> ale#Var(buffer, 'reason_ls_executable')},
|
||||
\ 'command': '%e',
|
||||
\ 'project_root': function('ale_linters#reason#ls#FindProjectRoot'),
|
||||
\ 'language': 'reason',
|
||||
\})
|
Reference in New Issue
Block a user