From 22d2a5a00b71d682d5dfe3364ad8ac32fe7f7850 Mon Sep 17 00:00:00 2001 From: Blallo Date: Wed, 21 Jul 2021 20:41:08 +0200 Subject: [PATCH] Add elixir configs --- config/ale.vim | 5 +++-- config/language-client.vim | 5 ++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/config/ale.vim b/config/ale.vim index face3dd..89c7e35 100644 --- a/config/ale.vim +++ b/config/ale.vim @@ -1,19 +1,20 @@ """ ALE configuration +let s:user_dir = has('win32') ? expand('~/vimfiles') : expand('~/.vim') let g:ale_completion_enabled = 0 let g:ale_sign_error = '->' let g:ale_sign_warning = '~>' " let g:ale_sign_error = '✘' " let g:ale_sign_warning = '⚠' -let g:ale_elixir_elixir_ls_release = '/usr/lib/elixir-ls/' +let g:ale_elixir_elixir_ls_release = s:user_dir . './pack/vendor/start/vim-elixirls/elixir-ls/release' let g:ale_linters = { \ 'javascript': ['eslint'], \ 'typescript': ['tsserver', 'tslint'], \ 'python': ['pyls', 'pylint'], \ 'rust': ['rls'], -\ 'elixir': ['elixir-ls'], +\ 'elixir': ['credo', 'elixir-ls'], \ 'go': ['gopls'], \ 'json': ['jsonlint'], \ 'dockerfile': ['hadolint'], diff --git a/config/language-client.vim b/config/language-client.vim index 1cd8c5b..b3078b3 100644 --- a/config/language-client.vim +++ b/config/language-client.vim @@ -9,9 +9,11 @@ set hidden " \ 'ruby': ['~/.rbenv/shims/solargraph', 'stdio'], " \ } +let s:user_dir = has('win32') ? expand('~/vimfiles') : expand('~/.vim') + let g:LanguageClient_serverCommands = { \ 'rust': ['/usr/bin/rustup', 'run', 'stable', 'rls'], -\ 'elixir': ['/usr/lib/elixir-ls/language_server.sh'], +\ 'elixir': [ s:user_dir . '/pack/vendor/start/vim-elixirls/elixir-ls/release/language_server.sh'], \ 'elm': ['/usr/bin/elm-language-server'], \ 'python': ['/usr/bin/pyls'], \ 'go': ['/usr/bin/gopls'], @@ -19,6 +21,7 @@ let g:LanguageClient_serverCommands = { let g:LanguageClient_rootMarkers = { \ 'elm': ['elm.json'], +\ 'elixir': ['mix.exs'], \ } " note that if you are using Plug mapping you should not use `noremap` mappings.