Enable tagnameonly functionality for jsx files (#291)

* Enable tagnameonly functionality for jsx files

* tsxCloseString -> jsxCloseString

---------

Co-authored-by: Ezequiel Rodriguez <ezerodriguez@tesla.com>
This commit is contained in:
Ezequiel Rodriguez
2023-05-29 13:55:04 -07:00
committed by GitHub
parent b8eca3b588
commit 02b906cf77

View File

@@ -0,0 +1,25 @@
" vim match-up - even better matching
"
" Maintainer: Andy Massimino
" Email: a@normed.space
"
if !exists('g:loaded_matchup') || !exists('b:did_ftplugin')
finish
endif
let s:save_cpo = &cpo
set cpo&vim
let b:match_skip = 's:\%(comment\|string\)\%(jsxCloseString\)\@<!'
if matchup#util#matchpref('tagnameonly', 0)
call matchup#util#patch_match_words('\)\%(', '\)\g{hlend}\%(')
call matchup#util#patch_match_words('\)\%(', '\)\g{hlend}\%(')
call matchup#util#patch_match_words('1>', '1\g{hlend}>')
call matchup#util#patch_match_words(':/>', ':/\g{hlend}>')
endif
let &cpo = s:save_cpo
" vim: sw=2