2018-09-28 18:42:50 +00:00
|
|
|
" Author: Jon Parise <jon@indelible.org>
|
2018-10-31 17:24:03 +00:00
|
|
|
" Description: ElixirLS integration (https://github.com/JakeBecker/elixir-ls)
|
2018-09-28 18:42:50 +00:00
|
|
|
|
|
|
|
call ale#Set('elixir_elixir_ls_release', 'elixir-ls')
|
2018-10-31 17:24:03 +00:00
|
|
|
call ale#Set('elixir_elixir_ls_config', {})
|
2018-09-28 18:42:50 +00:00
|
|
|
|
|
|
|
function! ale_linters#elixir#elixir_ls#GetExecutable(buffer) abort
|
|
|
|
let l:dir = ale#path#Simplify(ale#Var(a:buffer, 'elixir_elixir_ls_release'))
|
2019-04-07 14:34:39 +00:00
|
|
|
let l:cmd = has('win32') ? '\language_server.bat' : '/language_server.sh'
|
2018-09-28 18:42:50 +00:00
|
|
|
|
|
|
|
return l:dir . l:cmd
|
|
|
|
endfunction
|
|
|
|
|
|
|
|
call ale#linter#Define('elixir', {
|
|
|
|
\ 'name': 'elixir-ls',
|
|
|
|
\ 'lsp': 'stdio',
|
2019-02-22 18:05:04 +00:00
|
|
|
\ 'executable': function('ale_linters#elixir#elixir_ls#GetExecutable'),
|
|
|
|
\ 'command': function('ale_linters#elixir#elixir_ls#GetExecutable'),
|
|
|
|
\ 'project_root': function('ale#handlers#elixir#FindMixUmbrellaRoot'),
|
|
|
|
\ 'lsp_config': {b -> ale#Var(b, 'elixir_elixir_ls_config')},
|
2018-09-28 18:42:50 +00:00
|
|
|
\})
|