From 8e61708b4527072aa9250deb2c4cf7a56e3f3b0a Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Sat, 24 Oct 2020 18:52:18 +0200 Subject: Use vim-polyglot only as fallback to other plugins, fixes #580 --- scripts/build | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'scripts/build') diff --git a/scripts/build b/scripts/build index efae3219..7d678e43 100755 --- a/scripts/build +++ b/scripts/build @@ -293,6 +293,15 @@ def copy_file(name, src, dest) open(src, "r") do |input| open(dest, "w") do |output| + if dest.match?(/\.vim$/) && !dest.match('after/') + output << <<~EOF + let files = filter(globpath(&rtp, '#{dest}', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) + if len(files) > 0 + exec 'source ' . files[0] + finish + endif + EOF + end if name == "jsx" output << "if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1)\n\n" else -- cgit v1.2.3