summaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
Diffstat (limited to 'autoload')
-rw-r--r--autoload/ale/racket.vim12
1 files changed, 12 insertions, 0 deletions
diff --git a/autoload/ale/racket.vim b/autoload/ale/racket.vim
new file mode 100644
index 00000000..ff896108
--- /dev/null
+++ b/autoload/ale/racket.vim
@@ -0,0 +1,12 @@
+function! ale#racket#FindProjectRoot(buffer) abort
+ let l:cwd = expand('#' . a:buffer . ':p:h')
+ let l:highest_init = l:cwd
+
+ for l:path in ale#path#Upwards(l:cwd)
+ if filereadable(l:path.'/init.rkt')
+ let l:highest_init = l:path
+ endif
+ endfor
+
+ return l:highest_init
+endfunction