summaryrefslogtreecommitdiffstats
path: root/vimrc
diff options
context:
space:
mode:
Diffstat (limited to 'vimrc')
-rw-r--r--vimrc18
1 files changed, 18 insertions, 0 deletions
diff --git a/vimrc b/vimrc
index 2b1978d..405b5b5 100644
--- a/vimrc
+++ b/vimrc
@@ -660,6 +660,24 @@ let g:ale_linters = {
\}
let g:ale_rust_cargo_use_check = 1
+
+function! s:rubocop_in_bundler()
+ let gemfiles = glob("*.gemspec", 1, 1)
+ if filereadable("Gemfile")
+ let gemfiles += ["Gemfile"]
+ endif
+ for file in gemfiles
+ for line in readfile(file)
+ if line =~ 'gem.*rubocop'
+ return 1
+ endif
+ endfor
+ endfor
+ return 0
+endfunction
+if s:rubocop_in_bundler()
+ let g:ale_ruby_rubocop_executable = 'bundle'
+endif
" }}}
" airline
" commentary {{{