From 8b6c06e7239eb46d5b5096fd7fe9507aca88b091 Mon Sep 17 00:00:00 2001 From: TravonteD Date: Fri, 19 Jun 2020 08:47:03 -0400 Subject: 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. --- ftdetect/polyglot.vim | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'ftdetect') diff --git a/ftdetect/polyglot.vim b/ftdetect/polyglot.vim index 39ba7120..72d64410 100644 --- a/ftdetect/polyglot.vim +++ b/ftdetect/polyglot.vim @@ -546,6 +546,12 @@ if index(g:polyglot_disabled, 'ruby') == -1 au BufNewFile,BufRead [vV]agrantfile set ft=ruby 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 au BufNewFile,BufRead *.rs set ft=rust endif -- cgit v1.2.3