1
0
Fork 0
mirror of synced 2024-11-03 00:58:59 -04:00
ultimate-vim/sources_non_forked/ale/ale_linters/elixir/elixir_ls.vim

22 lines
854 B
VimL
Raw Normal View History

2018-11-01 06:03:42 -04:00
" Author: Jon Parise <jon@indelible.org>
2018-12-17 06:28:27 -05:00
" Description: ElixirLS integration (https://github.com/JakeBecker/elixir-ls)
2018-11-01 06:03:42 -04:00
call ale#Set('elixir_elixir_ls_release', 'elixir-ls')
2018-12-17 06:28:27 -05:00
call ale#Set('elixir_elixir_ls_config', {})
2018-11-01 06:03:42 -04:00
function! ale_linters#elixir#elixir_ls#GetExecutable(buffer) abort
let l:dir = ale#path#Simplify(ale#Var(a:buffer, 'elixir_elixir_ls_release'))
let l:cmd = ale#Has('win32') ? '\language_server.bat' : '/language_server.sh'
return l:dir . l:cmd
endfunction
call ale#linter#Define('elixir', {
\ 'name': 'elixir-ls',
\ 'lsp': 'stdio',
\ 'executable_callback': 'ale_linters#elixir#elixir_ls#GetExecutable',
\ 'command_callback': 'ale_linters#elixir#elixir_ls#GetExecutable',
2018-12-17 06:28:27 -05:00
\ 'project_root_callback': 'ale#handlers#elixir#FindMixUmbrellaRoot',
\ 'lsp_config_callback': ale#VarFunc('elixir_elixir_ls_config'),
2018-11-01 06:03:42 -04:00
\})