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 --- autoload/jsx_pretty/comment.vim | 5 +++++ autoload/jsx_pretty/indent.vim | 5 +++++ 2 files changed, 10 insertions(+) (limited to 'autoload/jsx_pretty') diff --git a/autoload/jsx_pretty/comment.vim b/autoload/jsx_pretty/comment.vim index 7ba23b82..15442453 100644 --- a/autoload/jsx_pretty/comment.vim +++ b/autoload/jsx_pretty/comment.vim @@ -1,3 +1,8 @@ +let files = filter(globpath(&rtp, 'autoload/jsx_pretty/comment.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, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1) function! jsx_pretty#comment#update_commentstring(original) diff --git a/autoload/jsx_pretty/indent.vim b/autoload/jsx_pretty/indent.vim index be78ccaa..77d62038 100644 --- a/autoload/jsx_pretty/indent.vim +++ b/autoload/jsx_pretty/indent.vim @@ -1,3 +1,8 @@ +let files = filter(globpath(&rtp, 'autoload/jsx_pretty/indent.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, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1) if exists('*shiftwidth') -- cgit v1.2.3