diff options
author | w0rp <devw0rp@gmail.com> | 2023-09-14 00:38:12 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2023-09-14 00:40:56 +0100 |
commit | be69af270547b0d1dd5fe947efb3f61455f709ed (patch) | |
tree | 3d72ab429ed3d6025fb88accbd2be753fb78f26a /ale_linters/elm | |
parent | 9092af9ad6a5c93a759be571323ea1d0cafa8d6e (diff) | |
download | ale-be69af270547b0d1dd5fe947efb3f61455f709ed.zip |
#4607 No conflicts with nvim-lspconfig by default
Default `g:ale_disable_lsp` to a new mode `'auto'` by default. With this
setting applied, ALE will now check for the presence of nvim-lspconfig
and automatically turn off particular LSP linters if already configured
via nvim-lspconfig.
For users that do not use `nvim-lspconfig`, everything should work as
before.
Diffstat (limited to 'ale_linters/elm')
-rw-r--r-- | ale_linters/elm/ls.vim (renamed from ale_linters/elm/elm_ls.vim) | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/ale_linters/elm/elm_ls.vim b/ale_linters/elm/ls.vim index a02dbf42..38a5b234 100644 --- a/ale_linters/elm/elm_ls.vim +++ b/ale_linters/elm/ls.vim @@ -10,13 +10,13 @@ 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 +function! ale_linters#elm#ls#GetProjectRoot(buffer) abort let l:elm_json = ale#path#FindNearestFile(a:buffer, 'elm.json') return !empty(l:elm_json) ? fnamemodify(l:elm_json, ':p:h') : '' endfunction -function! elm_ls#GetOptions(buffer) abort +function! ale_linters#elm#ls#GetOptions(buffer) abort return { \ 'elmPath': ale#Var(a:buffer, 'elm_ls_elm_path'), \ 'elmFormatPath': ale#Var(a:buffer, 'elm_ls_elm_format_path'), @@ -26,7 +26,8 @@ function! elm_ls#GetOptions(buffer) abort endfunction call ale#linter#Define('elm', { -\ 'name': 'elm_ls', +\ 'name': 'ls', +\ 'aliases': ['elm_ls'], \ 'lsp': 'stdio', \ 'executable': {b -> ale#path#FindExecutable(b, 'elm_ls', [ \ 'node_modules/.bin/elm-language-server', @@ -34,7 +35,7 @@ call ale#linter#Define('elm', { \ 'elm-lsp' \ ])}, \ 'command': '%e --stdio', -\ 'project_root': function('elm_ls#GetRootDir'), +\ 'project_root': function('ale_linters#elm#ls#GetProjectRoot'), \ 'language': 'elm', \ 'initialization_options': function('elm_ls#GetOptions') \}) |