mirror of
https://github.com/amix/vimrc
synced 2025-07-13 14:55:01 +08:00
Updated plugins
This commit is contained in:
@ -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')
|
||||
\})
|
Reference in New Issue
Block a user