set nocompatible

" load match-up
let s:path = simplify(expand('<sfile>:h').'/../../..')
let &rtp  = s:path.',' . &rtp
let &rtp .= ','.s:path.'/after'

autocmd FileType * echo &ft | sleep 1

call plug#begin('~/.vim/plugged')
Plug 'mxw/vim-jsx'
Plug 'othree/yajs.vim'
Plug 'othree/es.next.syntax.vim'
call plug#end()

filetype plugin indent on
syntax enable

" match-up options go here
function! JsxHotfix()
    echo 'JsxHotfix'
    setlocal matchpairs=(:),{:},[:],<:>
    let b:match_words = '<\@<=\([^/][^ \t>]*\)\g{hlend}[^>]*\%(/\@<!>\|$\):<\@<=/\1>'
endfunction
let g:matchup_hotfix = { 'javascript.jsx': 'JsxHotfix' }