diff --git a/config.vim b/config.vim index 4e6ecae..21be71b 100644 --- a/config.vim +++ b/config.vim @@ -1,3 +1,9 @@ +function! s:setf(filetype) abort + if &filetype !=# a:filetype + let &filetype = a:filetype + endif +endfunction + " Enable jsx syntax by default if !exists('g:jsx_ext_required') let g:jsx_ext_required = 0 diff --git a/ftdetect/polyglot.vim b/ftdetect/polyglot.vim index 3fb5107..830b1fb 100644 --- a/ftdetect/polyglot.vim +++ b/ftdetect/polyglot.vim @@ -1,3 +1,9 @@ +function! s:setf(filetype) abort + if &filetype !=# a:filetype + let &filetype = a:filetype + endif +endfunction + " Enable jsx syntax by default if !exists('g:jsx_ext_required') let g:jsx_ext_required = 0