Skip to content

Commit b632735

Browse files
committed
Set makeprg with projectile.vim
1 parent 206c73b commit b632735

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

autoload/rails.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1404,8 +1404,8 @@ function! s:readable_default_rake_task(...) dict abort
14041404
endif
14051405
endfunction
14061406

1407-
function! s:app_rake_command() dict abort
1408-
if self.has_path('.zeus.sock') && executable('zeus')
1407+
function! s:app_rake_command(...) dict abort
1408+
if get(a:, 1) !=# 'static' && self.has_path('.zeus.sock') && executable('zeus')
14091409
return 'zeus rake'
14101410
elseif self.has_path('bin/rake')
14111411
return self.ruby_script_command('bin/rake')

plugin/rails.vim

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,10 @@ augroup railsPluginDetect
7474
\ if RailsDetect() | call rails#buffer_syntax() | endif
7575

7676
autocmd User ProjectileDetect
77-
\ if RailsDetect() | call projectile#append(b:rails_root, {}) | endif
77+
\ if RailsDetect() |
78+
\ call projectile#append(b:rails_root,
79+
\ {'*': {'make': split(rails#app().rake_command('static'))}}) |
80+
\ endif
7881
augroup END
7982

8083
command! -bar -bang -nargs=* -complete=dir Rails execute rails#new_app_command(<bang>0,<f-args>)

0 commit comments

Comments
 (0)