diff options
Diffstat (limited to 'autoload')
-rw-r--r-- | autoload/ale/d.vim | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/autoload/ale/d.vim b/autoload/ale/d.vim new file mode 100644 index 00000000..0e232203 --- /dev/null +++ b/autoload/ale/d.vim @@ -0,0 +1,16 @@ +" Author: Auri <me@aurieh.me> +" Description: Functions for integrating with D linters. + +function! ale#d#FindDUBConfig(buffer) abort + " Find a DUB configuration file in ancestor paths. + " The most DUB-specific names will be tried first. + for l:possible_filename in ['dub.sdl', 'dub.json', 'package.json'] + let l:dub_file = ale#path#FindNearestFile(a:buffer, l:possible_filename) + + if !empty(l:dub_file) + return l:dub_file + endif + endfor + + return '' +endfunction |