mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-12 13:33:49 -05:00
Add detection for rspec files (#503)
Standard convention for rspec files is "*_spec.rb". This is also what rspec.vim (the syntax plugin that is pulled in) uses.
This commit is contained in:
@@ -546,6 +546,12 @@ if index(g:polyglot_disabled, 'ruby') == -1
|
|||||||
au BufNewFile,BufRead [vV]agrantfile set ft=ruby
|
au BufNewFile,BufRead [vV]agrantfile set ft=ruby
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
" Declared after ruby so that the more general *.rb
|
||||||
|
" doesn't override
|
||||||
|
if index(g:polyglot_disabled, 'rspec') == -1
|
||||||
|
au BufNewFile,BufRead *_spec.rb set ft=rspec
|
||||||
|
endif
|
||||||
|
|
||||||
if index(g:polyglot_disabled, 'rust') == -1
|
if index(g:polyglot_disabled, 'rust') == -1
|
||||||
au BufNewFile,BufRead *.rs set ft=rust
|
au BufNewFile,BufRead *.rs set ft=rust
|
||||||
endif
|
endif
|
||||||
|
|||||||
Reference in New Issue
Block a user