From 48e07bc5014fecfdff24f75124a65634c216c9e2 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Fri, 6 Sep 2019 15:54:31 +0200 Subject: Improve guard to support concatenated files --- after/ftplugin/javascript.vim | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'after/ftplugin/javascript.vim') diff --git a/after/ftplugin/javascript.vim b/after/ftplugin/javascript.vim index 463b854a..2ca2fd1c 100644 --- a/after/ftplugin/javascript.vim +++ b/after/ftplugin/javascript.vim @@ -1,7 +1,4 @@ -if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'javascript') != -1 - finish -endif - +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'javascript') == -1 " Vim filetype plugin file " Language: JavaScript " Maintainer: vim-javascript community @@ -14,10 +11,8 @@ if exists('b:undo_ftplugin') else let b:undo_ftplugin = 'setlocal iskeyword< suffixesadd<' endif -if exists('g:polyglot_disabled') && (index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'jsx') != -1) - finish endif - +if !exists('g:polyglot_disabled') || !(index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'jsx') != -1) """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Vim ftplugin file " @@ -49,10 +44,8 @@ augroup jsx_comment augroup end setlocal suffixesadd+=.jsx -if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'styled-components') != -1 - finish endif - +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'styled-components') == -1 " Vim filetype plugin file " Language: styled-components (js/ts) " Maintainer: Karl Fleischmann @@ -90,3 +83,4 @@ if exists('&ofu') endif setl omnifunc=styledcomplete#CompleteSC endif +endif -- cgit v1.2.3