Merge pull request #2750 from andys8/improvement/elm-language-server-elm-analyse-trigger-param

Elm language server params update
This commit is contained in:
w0rp 2019-10-07 19:30:59 +01:00 committed by GitHub
commit 8097d51e33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 7 deletions

View File

@ -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

View File

@ -50,7 +50,7 @@ g:ale_elm_ls_use_global *g:ale_elm_ls_use_global*
g:ale_elm_ls_elm_path *g:ale_elm_ls_elm_path*
*b:ale_elm_ls_elm_path*
Type: |String|
Default: `'elm'`
Default: `''`
See |ale-integrations-local-executables|
@ -58,7 +58,7 @@ g:ale_elm_ls_elm_path *g:ale_elm_ls_elm_path*
g:ale_elm_ls_elm_format_path *g:ale_elm_ls_elm_format_path*
*b:ale_elm_ls_elm_format_path*
Type: |String|
Default: `'elm-format'`
Default: `''`
See |ale-integrations-local-executables|
@ -66,10 +66,18 @@ g:ale_elm_ls_elm_format_path *g:ale_elm_ls_elm_format_path*
g:ale_elm_ls_elm_test_path *g:ale_elm_ls_elm_test_path*
*b:ale_elm_ls_elm_test_path*
Type: |String|
Default: `'elm-test'`
Default: `''`
See |ale-integrations-local-executables|
g:ale_elm_ls_elm_analyse_trigger *g:ale_elm_ls_elm_analyse_trigger*
*b:ale_elm_ls_elm_analyse_trigger*
Type: |String|
Default: `'change'`
One of 'change', 'save' or 'never'
===============================================================================
elm-make *ale-elm-elm-make*