1
0
Fork 0
mirror of synced 2024-11-09 18:58:58 -05:00
ultimate-vim/sources_non_forked/ale/ale_linters/reason/ls.vim

25 lines
730 B
VimL
Raw Normal View History

2019-08-22 11:36:17 -04:00
" 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',
2024-01-07 10:14:20 -05:00
\ 'aliases': ['reason_ls'],
2019-08-22 11:36:17 -04:00
\ 'lsp': 'stdio',
\ 'executable': {buffer -> ale#Var(buffer, 'reason_ls_executable')},
\ 'command': '%e',
\ 'project_root': function('ale_linters#reason#ls#FindProjectRoot'),
\ 'language': 'reason',
\})