summaryrefslogtreecommitdiffstats
path: root/ftdetect
diff options
context:
space:
mode:
authorTravonteD <tman1300@aol.com>2020-06-19 08:47:03 -0400
committerGitHub <noreply@github.com>2020-06-19 14:47:03 +0200
commit8b6c06e7239eb46d5b5096fd7fe9507aca88b091 (patch)
treea2c04cf32198a8d550cfd38b3698eb3b74233872 /ftdetect
parenta86c0179ebc99b15d403e3f1d4a4cfff83b47de8 (diff)
downloadvim-polyglot-8b6c06e7239eb46d5b5096fd7fe9507aca88b091.tar.gz
vim-polyglot-8b6c06e7239eb46d5b5096fd7fe9507aca88b091.zip
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.
Diffstat (limited to 'ftdetect')
-rw-r--r--ftdetect/polyglot.vim6
1 files changed, 6 insertions, 0 deletions
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