summaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorAuri <me@aurieh.me>2018-10-17 18:11:41 +0300
committerw0rp <w0rp@users.noreply.github.com>2018-10-17 16:11:41 +0100
commitbe21aa5cda39850d9f0261e3b6cac9d48a170756 (patch)
treedac5b3105be2930e81be392b7afbcdbed1d75309 /autoload
parentd999eb1f3564cb2933059ae2bc1e7d5edda2a8d2 (diff)
downloadale-be21aa5cda39850d9f0261e3b6cac9d48a170756.zip
New linter: dls (#1992)
* New linter: dls
Diffstat (limited to 'autoload')
-rw-r--r--autoload/ale/d.vim16
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