Skip to content

Commit

Permalink
Use rails compiler plugin for :make
Browse files Browse the repository at this point in the history
Note that previously, use of a compiler plugin was limited to systems
with Projectionist present, but now it's enabled for all users.
  • Loading branch information
tpope committed Apr 23, 2015
1 parent 73bd62f commit 727b71b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions autoload/rails.vim
Expand Up @@ -4821,6 +4821,11 @@ function! rails#buffer_setup() abort
endif
endif
endif

compiler rails
let &l:makeprg = self.app().rake_command('static')
let &l:errorformat .= ',chdir '.escape(self.app().path(), ',')

if self.type_name('test', 'spec', 'cucumber')
call self.setvar('dispatch', ':Runner')
elseif self.name() ==# 'Rakefile'
Expand Down
2 changes: 1 addition & 1 deletion plugin/rails.vim
Expand Up @@ -82,7 +82,7 @@ augroup railsPluginDetect
autocmd User ProjectionistDetect
\ if RailsDetect(get(g:, 'projectionist_file', '')) |
\ call projectionist#append(b:rails_root,
\ {'*': {'make': split(rails#app().rake_command('static'))}}) |
\ {'*': {}}) |
\ endif
augroup END

Expand Down

0 comments on commit 727b71b

Please sign in to comment.