Add elixir configs

This commit is contained in:
sfigato 2021-07-21 20:41:08 +02:00
parent 2461440c3a
commit 22d2a5a00b
Signed by: blallo
GPG Key ID: 0CBE577C9B72DC3F
2 changed files with 7 additions and 3 deletions

View File

@ -1,19 +1,20 @@
""" ALE configuration """ ALE configuration
let s:user_dir = has('win32') ? expand('~/vimfiles') : expand('~/.vim')
let g:ale_completion_enabled = 0 let g:ale_completion_enabled = 0
let g:ale_sign_error = '->' let g:ale_sign_error = '->'
let g:ale_sign_warning = '~>' let g:ale_sign_warning = '~>'
" let g:ale_sign_error = '✘' " let g:ale_sign_error = '✘'
" let g:ale_sign_warning = '⚠' " 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 = { let g:ale_linters = {
\ 'javascript': ['eslint'], \ 'javascript': ['eslint'],
\ 'typescript': ['tsserver', 'tslint'], \ 'typescript': ['tsserver', 'tslint'],
\ 'python': ['pyls', 'pylint'], \ 'python': ['pyls', 'pylint'],
\ 'rust': ['rls'], \ 'rust': ['rls'],
\ 'elixir': ['elixir-ls'], \ 'elixir': ['credo', 'elixir-ls'],
\ 'go': ['gopls'], \ 'go': ['gopls'],
\ 'json': ['jsonlint'], \ 'json': ['jsonlint'],
\ 'dockerfile': ['hadolint'], \ 'dockerfile': ['hadolint'],

View File

@ -9,9 +9,11 @@ set hidden
" \ 'ruby': ['~/.rbenv/shims/solargraph', 'stdio'], " \ 'ruby': ['~/.rbenv/shims/solargraph', 'stdio'],
" \ } " \ }
let s:user_dir = has('win32') ? expand('~/vimfiles') : expand('~/.vim')
let g:LanguageClient_serverCommands = { let g:LanguageClient_serverCommands = {
\ 'rust': ['/usr/bin/rustup', 'run', 'stable', 'rls'], \ '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'], \ 'elm': ['/usr/bin/elm-language-server'],
\ 'python': ['/usr/bin/pyls'], \ 'python': ['/usr/bin/pyls'],
\ 'go': ['/usr/bin/gopls'], \ 'go': ['/usr/bin/gopls'],
@ -19,6 +21,7 @@ let g:LanguageClient_serverCommands = {
let g:LanguageClient_rootMarkers = { let g:LanguageClient_rootMarkers = {
\ 'elm': ['elm.json'], \ 'elm': ['elm.json'],
\ 'elixir': ['mix.exs'],
\ } \ }
" note that if you are using Plug mapping you should not use `noremap` mappings. " note that if you are using Plug mapping you should not use `noremap` mappings.