mirror of
https://github.com/chenasraf/vim-matchup.git
synced 2026-05-17 17:38:01 +00:00
36 lines
596 B
VimL
36 lines
596 B
VimL
set nocompatible
|
|
source ../common/bootstrap.vim
|
|
|
|
if !has('nvim-0.5.0')
|
|
finish
|
|
endif
|
|
|
|
function! s:assert_ts_active()
|
|
call assert_true(index(
|
|
\ b:matchup_active_engines.delim_all, 'tree_sitter') > -1)
|
|
endfunction
|
|
|
|
" python
|
|
silent edit example.py
|
|
|
|
call s:assert_ts_active()
|
|
|
|
0go
|
|
norm %
|
|
call assert_equal([3, 10], getcurpos()[1:2])
|
|
norm 2%
|
|
call assert_equal([10, 12], getcurpos()[1:2])
|
|
|
|
" ruby
|
|
silent edit example.rb
|
|
|
|
call s:assert_ts_active()
|
|
|
|
0go
|
|
norm %
|
|
call assert_equal([3, 4], getcurpos()[1:2])
|
|
norm 2%
|
|
call assert_equal([1, 1], getcurpos()[1:2])
|
|
|
|
call matchup#test#finished()
|