summaryrefslogtreecommitdiffstats
path: root/autoload/rustfmt.vim
diff options
context:
space:
mode:
Diffstat (limited to 'autoload/rustfmt.vim')
-rw-r--r--autoload/rustfmt.vim5
1 files changed, 5 insertions, 0 deletions
diff --git a/autoload/rustfmt.vim b/autoload/rustfmt.vim
index 28cca07a..c847219b 100644
--- a/autoload/rustfmt.vim
+++ b/autoload/rustfmt.vim
@@ -1,3 +1,8 @@
+let files = filter(globpath(&rtp, 'autoload/rustfmt.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" })
+if len(files) > 0
+ exec 'source ' . files[0]
+ finish
+endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rust') == -1
" Author: Stephen Sugden <stephen@stephensugden.com>