This repository has been archived on 2024-03-28. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/apps/neovim/ftplugin/elixir.vim
2019-06-25 15:57:42 -05:00

34 lines
883 B
VimL

" let b:ale_fixers = ['mix_format']
let b:ale_linters = ['dogma', 'credo', 'dialyxir', 'mix']
" let g:ale_elixir_elixir_ls_release = '/Users/danielflanagan/Documents/code/open-source/elixir-ls/'
let g:elixirls = {
\ 'path': printf('%s/%s', stdpath('config'), 'bundle/elixir-ls'),
\ }
let g:elixirls.lsp = printf(
\ '%s/%s',
\ g:elixirls.path,
\ 'release/language_server.sh')
function! g:elixirls.compile(...)
let l:commands = join([
\ 'mix local.hex --force',
\ 'mix local.rebar --force',
\ 'mix deps.get',
\ 'mix compile',
\ 'mix elixir_ls.release'
\ ], '&&')
echom '>>> Compiling elixirls'
silent call system(l:commands)
echom '>>> elixirls compiled'
endfunction
call coc#config('languageserver', {
\ 'elixir': {
\ 'command': g:elixirls.lsp,
\ 'trace.server': 'verbose',
\ 'filetypes': ['elixir', 'eelixir']
\ }
\})