mirror of
https://github.com/dense-analysis/ale.git
synced 2026-02-04 00:52:50 +08:00
Add configuration dictionary support to elixir-ls
This adds generic configuration dictionary support to the elixir-ls linter. This is useful for disabling its built-in Dialyzer support, for example, which can improve startup time. The configuration dictionary is a little verbose. I considered reducing the user configuration to only the nested settings dictionary (and having the linter implementation wrap it in the top-level `elixirLS` dictionary), but leaving it fully configurable simplifies the code and removes any assumptions about current or future ElixirLS behavior.
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
" Author: Jon Parise <jon@indelible.org>
|
||||
" Description: elixir-ls integration (https://github.com/JakeBecker/elixir-ls)
|
||||
" Description: ElixirLS integration (https://github.com/JakeBecker/elixir-ls)
|
||||
|
||||
call ale#Set('elixir_elixir_ls_release', 'elixir-ls')
|
||||
call ale#Set('elixir_elixir_ls_config', {})
|
||||
|
||||
function! ale_linters#elixir#elixir_ls#GetExecutable(buffer) abort
|
||||
let l:dir = ale#path#Simplify(ale#Var(a:buffer, 'elixir_elixir_ls_release'))
|
||||
@@ -16,4 +17,5 @@ call ale#linter#Define('elixir', {
|
||||
\ 'executable_callback': 'ale_linters#elixir#elixir_ls#GetExecutable',
|
||||
\ 'command_callback': 'ale_linters#elixir#elixir_ls#GetExecutable',
|
||||
\ 'project_root_callback': 'ale#handlers#elixir#FindMixProjectRoot',
|
||||
\ 'lsp_config_callback': ale#VarFunc('elixir_elixir_ls_config'),
|
||||
\})
|
||||
|
||||
Reference in New Issue
Block a user