mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-08 11:33:52 -05:00
36 lines
1021 B
VimL
36 lines
1021 B
VimL
if polyglot#init#is_disabled(expand('<sfile>:p'), 'jsx', 'after/ftplugin/jsx.vim')
|
|
finish
|
|
endif
|
|
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
" Vim ftplugin file
|
|
"
|
|
" Language: javascript.jsx
|
|
" Maintainer: MaxMEllon <maxmellon1994@gmail.com>
|
|
"
|
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
|
|
" modified from html.vim
|
|
" For matchit plugin
|
|
if exists("loaded_matchit")
|
|
let b:match_ignorecase = 0
|
|
let b:match_words = '(:),\[:\],{:},<:>,' .
|
|
\ '<\@<=\([A-z0-9.]\+\):\(</\)\@<=\1'
|
|
endif
|
|
|
|
" For andymass/vim-matchup plugin
|
|
if exists("loaded_matchup")
|
|
setlocal matchpairs=(:),{:},[:],<:>
|
|
let b:match_words = '<\@<=\([^/][^ \t>]*\)\g{hlend}[^>]*\%(/\@<!>\|$\):<\@<=/\1>'
|
|
let b:match_skip = 's:comment\|string'
|
|
endif
|
|
|
|
let b:jsx_pretty_old_cms = &l:commentstring
|
|
|
|
augroup jsx_comment
|
|
autocmd! CursorMoved <buffer>
|
|
autocmd CursorMoved <buffer> call jsx_pretty#comment#update_commentstring(b:jsx_pretty_old_cms)
|
|
augroup end
|
|
|
|
setlocal suffixesadd+=.jsx
|