diff options
author | TravonteD <tman1300@aol.com> | 2020-06-19 08:47:03 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-19 14:47:03 +0200 |
commit | 8b6c06e7239eb46d5b5096fd7fe9507aca88b091 (patch) | |
tree | a2c04cf32198a8d550cfd38b3698eb3b74233872 | |
parent | a86c0179ebc99b15d403e3f1d4a4cfff83b47de8 (diff) | |
download | vim-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.
-rw-r--r-- | ftdetect/polyglot.vim | 6 |
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 |