mirror of
https://github.com/amix/vimrc
synced 2025-06-16 09:35:01 +08:00
Updated plugins
This commit is contained in:
@ -4,18 +4,6 @@
|
||||
call ale#Set('vue_vls_executable', 'vls')
|
||||
call ale#Set('vue_vls_use_global', get(g:, 'ale_use_global_executables', 0))
|
||||
|
||||
function! ale_linters#vue#vls#GetExecutable(buffer) abort
|
||||
return ale#node#FindExecutable(a:buffer, 'vue_vls', [
|
||||
\ 'node_modules/.bin/vls',
|
||||
\])
|
||||
endfunction
|
||||
|
||||
function! ale_linters#vue#vls#GetCommand(buffer) abort
|
||||
let l:exe = ale#Escape(ale_linters#vue#vls#GetExecutable(a:buffer))
|
||||
|
||||
return l:exe . ' --stdio'
|
||||
endfunction
|
||||
|
||||
function! ale_linters#vue#vls#GetProjectRoot(buffer) abort
|
||||
let l:package_path = ale#path#FindNearestFile(a:buffer, 'package.json')
|
||||
|
||||
@ -25,8 +13,10 @@ endfunction
|
||||
call ale#linter#Define('vue', {
|
||||
\ 'name': 'vls',
|
||||
\ 'lsp': 'stdio',
|
||||
\ 'executable_callback': 'ale_linters#vue#vls#GetExecutable',
|
||||
\ 'command_callback': 'ale_linters#vue#vls#GetCommand',
|
||||
\ 'executable_callback': ale#node#FindExecutableFunc('vue_vls', [
|
||||
\ 'node_modules/.bin/vls',
|
||||
\ ]),
|
||||
\ 'command': '%e --stdio',
|
||||
\ 'language': 'vue',
|
||||
\ 'project_root_callback': 'ale_linters#vue#vls#GetProjectRoot',
|
||||
\})
|
||||
|
Reference in New Issue
Block a user