summaryrefslogtreecommitdiff
path: root/ale_linters/elm/elm_ls.vim
diff options
context:
space:
mode:
authorandys8 <andys8@users.noreply.github.com>2019-09-03 21:59:27 +0200
committerandys8 <andys8@users.noreply.github.com>2019-09-04 00:20:12 +0200
commitbd1f7e142036bb7139ba53c99ad8fd3fd376f4be (patch)
treed4ff22316acea860d98e72b1cacc3a46ed75beae /ale_linters/elm/elm_ls.vim
parent6e18c03d80c323e740f87103fc05955b5c61b54e (diff)
downloadale-bd1f7e142036bb7139ba53c99ad8fd3fd376f4be.zip
Elm language server params update
* There is a new param 'elmAnalyseTrigger' (change|save|never) * Empty path default to let the language server search for binary
Diffstat (limited to 'ale_linters/elm/elm_ls.vim')
-rw-r--r--ale_linters/elm/elm_ls.vim11
1 files changed, 7 insertions, 4 deletions
diff --git a/ale_linters/elm/elm_ls.vim b/ale_linters/elm/elm_ls.vim
index 374ef8de..2fa71adb 100644
--- a/ale_linters/elm/elm_ls.vim
+++ b/ale_linters/elm/elm_ls.vim
@@ -3,9 +3,12 @@
call ale#Set('elm_ls_executable', 'elm-language-server')
call ale#Set('elm_ls_use_global', get(g:, 'ale_use_global_executables', 1))
-call ale#Set('elm_ls_elm_path', 'elm')
-call ale#Set('elm_ls_elm_format_path', 'elm-format')
-call ale#Set('elm_ls_elm_test_path', 'elm-test')
+
+" elm-language-server will search for local and global binaries, if empty
+call ale#Set('elm_ls_elm_path', '')
+call ale#Set('elm_ls_elm_format_path', '')
+call ale#Set('elm_ls_elm_test_path', '')
+call ale#Set('elm_ls_elm_analyse_trigger', 'change')
function! elm_ls#GetRootDir(buffer) abort
let l:elm_json = ale#path#FindNearestFile(a:buffer, 'elm.json')
@@ -15,10 +18,10 @@ endfunction
function! elm_ls#GetOptions(buffer) abort
return {
- \ 'runtime': 'node',
\ 'elmPath': ale#Var(a:buffer, 'elm_ls_elm_path'),
\ 'elmFormatPath': ale#Var(a:buffer, 'elm_ls_elm_format_path'),
\ 'elmTestPath': ale#Var(a:buffer, 'elm_ls_elm_test_path'),
+ \ 'elmAnalyseTrigger': ale#Var(a:buffer, 'elm_ls_elm_analyse_trigger'),
\}
endfunction