1
0
Fork 0
mirror of synced 2024-11-26 18:55:34 -05:00
ultimate-vim/sources_non_forked/ale/ale_linters/d/dls.vim
Amir Salihefendic d2d303593e Updated plugins
2018-11-01 11:03:42 +01:00

22 lines
740 B
VimL

" Author: aurieh <me@aurieh.me>
" Description: A Language Server implementation for D
call ale#Set('d_dls_executable', 'dls')
function! ale_linters#d#dls#GetExecutable(buffer) abort
return ale#Var(a:buffer, 'd_dls_executable')
endfunction
function! ale_linters#d#dls#FindProjectRoot(buffer) abort
" Note: this will return . if dub config is empty
" dls can run outside DUB projects just fine
return fnamemodify(ale#d#FindDUBConfig(a:buffer), ':h')
endfunction
call ale#linter#Define('d', {
\ 'name': 'dls',
\ 'lsp': 'stdio',
\ 'executable_callback': 'ale_linters#d#dls#GetExecutable',
\ 'command_callback': 'ale_linters#d#dls#GetExecutable',
\ 'project_root_callback': 'ale_linters#d#dls#FindProjectRoot',
\})