<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rneovim.git/runtime/plugin/matchparen.vim, branch master</title>
<subtitle>Neovim fork with Rahm's personal hacks.</subtitle>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/'/>
<entry>
<title>fix(matchparen): remove redundant vimscript shim</title>
<updated>2026-05-09T08:01:40+00:00</updated>
<author>
<name>Christian Clason</name>
<email>c.clason@uni-graz.at</email>
</author>
<published>2026-05-08T12:21:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=ef84ec69aaf8b178f90a8fc0b33b27b432199cb9'/>
<id>ef84ec69aaf8b178f90a8fc0b33b27b432199cb9</id>
<content type='text'>
Problem: #39625 retained `matchparen.vim` as a shim that sources the new
`matchparen.lua` entrypoint, which is redundant since Lua runtime/plugin
files are sourced automatically and incurs startuptime cost solely for
the sake of not touching the tests.

Solution: Remove the shim and `source` the Lua plugin in directly in
tests.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem: #39625 retained `matchparen.vim` as a shim that sources the new
`matchparen.lua` entrypoint, which is redundant since Lua runtime/plugin
files are sourced automatically and incurs startuptime cost solely for
the sake of not touching the tests.

Solution: Remove the shim and `source` the Lua plugin in directly in
tests.
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor(matchparen): rewrite matchparen plugin in Lua</title>
<updated>2026-05-08T09:17:03+00:00</updated>
<author>
<name>Yi Ming</name>
<email>ofseed@foxmail.com</email>
</author>
<published>2026-05-06T09:25:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=523e679ead65e57af8159b7bba49da98251df44e'/>
<id>523e679ead65e57af8159b7bba49da98251df44e</id>
<content type='text'>
AI-assisted: Codex
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
AI-assisted: Codex
</pre>
</div>
</content>
</entry>
<entry>
<title>vim-patch:9.1.1289: tests: no test for matchparen plugin with WinScrolled event (#33411)</title>
<updated>2025-04-10T00:46:49+00:00</updated>
<author>
<name>zeertzjq</name>
<email>zeertzjq@outlook.com</email>
</author>
<published>2025-04-10T00:46:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=51a967d58acc74db176c1955a7fa754a2708067b'/>
<id>51a967d58acc74db176c1955a7fa754a2708067b</id>
<content type='text'>
Problem:  tests: no test for matchparen plugin with WinScrolled event
Solution: add missing test

closes: vim/vim#10942

https://github.com/vim/vim/commit/96a0b2a6d5107580398435e263bd529d4ba3df49

Co-authored-by: Christian Brabandt &lt;cb@256bit.org&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:  tests: no test for matchparen plugin with WinScrolled event
Solution: add missing test

closes: vim/vim#10942

https://github.com/vim/vim/commit/96a0b2a6d5107580398435e263bd529d4ba3df49

Co-authored-by: Christian Brabandt &lt;cb@256bit.org&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>vim-patch:9.1.1203: matchparen keeps cursor on case label in sh filetype (#32900)</title>
<updated>2025-03-15T09:18:08+00:00</updated>
<author>
<name>zeertzjq</name>
<email>zeertzjq@outlook.com</email>
</author>
<published>2025-03-15T09:18:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=1b1af8aae83e86a6d313d20682d9e02562e94edb'/>
<id>1b1af8aae83e86a6d313d20682d9e02562e94edb</id>
<content type='text'>
Problem:  matchparen keeps cursor on case label in sh filetype
          (@categorical, after 9.1.1187).
Solution: Use :defer so that cursor is always restored, remove checks
          for older Vims, finish early if Vim does not support :defer

fixes: vim/vim#16887
closes: vim/vim#16888

https://github.com/vim/vim/commit/47071c6076018cace96f6e567054a21c123d0c10</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:  matchparen keeps cursor on case label in sh filetype
          (@categorical, after 9.1.1187).
Solution: Use :defer so that cursor is always restored, remove checks
          for older Vims, finish early if Vim does not support :defer

fixes: vim/vim#16887
closes: vim/vim#16888

https://github.com/vim/vim/commit/47071c6076018cace96f6e567054a21c123d0c10</pre>
</div>
</content>
</entry>
<entry>
<title>vim-patch:9.1.1187: matchparen plugin wrong highlights shell case statement (#32798)</title>
<updated>2025-03-09T08:57:08+00:00</updated>
<author>
<name>zeertzjq</name>
<email>zeertzjq@outlook.com</email>
</author>
<published>2025-03-09T08:57:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=d414d0e8eab8906db19e2f83b9983ce8727f8de6'/>
<id>d414d0e8eab8906db19e2f83b9983ce8727f8de6</id>
<content type='text'>
Problem:  matchparen plugin wrong highlights shell case statement
          (Swudu Susuwu)
Solution: return early, if we are in a shSnglCase syntax element

The shell syntax element "case $var in foobar)" uses closing parenthesis
but there is no corresponding opening parenthesis for that syntax
element. However matchparen is not aware of such things and will happily
try to match just the next opening parenthesis.

So let's just add a way to opt out for such cases. In this case, use the
syntax state to check if the closing parenthesis belongs to the syntax
item "shSnglCase" and if it is, do not try to find a corresponding
opening parenthesis.

Since inspecting the syntax state might be expensive, put the whole
check behind a filetype test, so that matchparen will only perform this
particular check, when it knows the current buffer is a "sh" filetype.

fixes: vim/vim#16801
closes: vim/vim#16831

https://github.com/vim/vim/commit/9102ac11ab3938ec8c15bfebd00d2f91d3f1cd6c

Co-authored-by: Christian Brabandt &lt;cb@256bit.org&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:  matchparen plugin wrong highlights shell case statement
          (Swudu Susuwu)
Solution: return early, if we are in a shSnglCase syntax element

The shell syntax element "case $var in foobar)" uses closing parenthesis
but there is no corresponding opening parenthesis for that syntax
element. However matchparen is not aware of such things and will happily
try to match just the next opening parenthesis.

So let's just add a way to opt out for such cases. In this case, use the
syntax state to check if the closing parenthesis belongs to the syntax
item "shSnglCase" and if it is, do not try to find a corresponding
opening parenthesis.

Since inspecting the syntax state might be expensive, put the whole
check behind a filetype test, so that matchparen will only perform this
particular check, when it knows the current buffer is a "sh" filetype.

fixes: vim/vim#16801
closes: vim/vim#16831

https://github.com/vim/vim/commit/9102ac11ab3938ec8c15bfebd00d2f91d3f1cd6c

Co-authored-by: Christian Brabandt &lt;cb@256bit.org&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>fix(runtime): let matchit and matchparen skips fallback on treesitter captures</title>
<updated>2025-01-04T19:11:43+00:00</updated>
<author>
<name>Emilia Simmons</name>
<email>emilia.milisims@gmail.com</email>
</author>
<published>2024-12-15T18:28:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=69aa33d890468c1024beef0d97d0f9424516c9ef'/>
<id>69aa33d890468c1024beef0d97d0f9424516c9ef</id>
<content type='text'>
When treesitter is enabled, by default syntax groups are not defined, but these
groups are used to identify where to skip matches in matchit and matchparen.

This patch does three things:
1. If syntax is enabled regardless of treesitter (`vim.bo.syntax='on'`):
   Use original implementation.
2. If treesitter is enabled and syntax is not:
   Match the syntax groups (i.e. `comment\|string`) against treesitter captures
   to check for skipped groups.
3. Add an explicit treesitter syntax for marking captures to skip:
   matchit uses `b:match_skip` to determine what counts as skippable
   Where 's:comment\|string' uses a match of the named syntax groups against
   a regex match of comment\|string, 't:comment\|string' now uses vim regex
   to match against the names of the treesitter capture groups.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When treesitter is enabled, by default syntax groups are not defined, but these
groups are used to identify where to skip matches in matchit and matchparen.

This patch does three things:
1. If syntax is enabled regardless of treesitter (`vim.bo.syntax='on'`):
   Use original implementation.
2. If treesitter is enabled and syntax is not:
   Match the syntax groups (i.e. `comment\|string`) against treesitter captures
   to check for skipped groups.
3. Add an explicit treesitter syntax for marking captures to skip:
   matchit uses `b:match_skip` to determine what counts as skippable
   Where 's:comment\|string' uses a match of the named syntax groups against
   a regex match of comment\|string, 't:comment\|string' now uses vim regex
   to match against the names of the treesitter capture groups.
</pre>
</div>
</content>
</entry>
<entry>
<title>vim-patch:59834ba: runtime(matchparen): Add matchparen_disable_cursor_hl config option</title>
<updated>2024-11-05T07:31:19+00:00</updated>
<author>
<name>Christian Clason</name>
<email>c.clason@uni-graz.at</email>
</author>
<published>2024-11-04T20:54:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=baf74ef9755e19781f52c3884023321c0198a3b5'/>
<id>baf74ef9755e19781f52c3884023321c0198a3b5</id>
<content type='text'>
Set the "matchparen_disable_cursor_hl" config variable to disable
highlighting the cursor with the MatchParen highlighting group.

closes: vim/vim#15984

https://github.com/vim/vim/commit/59834ba6df10dc48565bf55ac6c8e8a4aa40210b

Co-authored-by: Matteo Landi &lt;matteo@matteolandi.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Set the "matchparen_disable_cursor_hl" config variable to disable
highlighting the cursor with the MatchParen highlighting group.

closes: vim/vim#15984

https://github.com/vim/vim/commit/59834ba6df10dc48565bf55ac6c8e8a4aa40210b

Co-authored-by: Matteo Landi &lt;matteo@matteolandi.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vim-patch:9.1.0694: matchparen is slow on a long line (#30134)</title>
<updated>2024-08-24T22:07:43+00:00</updated>
<author>
<name>zeertzjq</name>
<email>zeertzjq@outlook.com</email>
</author>
<published>2024-08-24T22:07:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=cf44121f7fb6f55a22e644a1e5e1f1dc6b90c27a'/>
<id>cf44121f7fb6f55a22e644a1e5e1f1dc6b90c27a</id>
<content type='text'>
Problem:  The matchparen plugin is slow on a long line.
Solution: Don't use a regexp to get char at and before cursor.
          (zeertzjq)

Example:

```vim
  call setline(1, repeat(' foobar', 100000))
  runtime plugin/matchparen.vim
  normal! $hhhhhhhh
```

closes: vim/vim#15568

https://github.com/vim/vim/commit/81e7513c86459c40676bd983f73c2722096d67a9</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:  The matchparen plugin is slow on a long line.
Solution: Don't use a regexp to get char at and before cursor.
          (zeertzjq)

Example:

```vim
  call setline(1, repeat(' foobar', 100000))
  runtime plugin/matchparen.vim
  normal! $hhhhhhhh
```

closes: vim/vim#15568

https://github.com/vim/vim/commit/81e7513c86459c40676bd983f73c2722096d67a9</pre>
</div>
</content>
</entry>
<entry>
<title>vim-patch:94043780196c (#28831)</title>
<updated>2024-05-18T07:53:26+00:00</updated>
<author>
<name>zeertzjq</name>
<email>zeertzjq@outlook.com</email>
</author>
<published>2024-05-18T07:53:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=48c2ad5d2d79a314502b11c868045d28bc23efab'/>
<id>48c2ad5d2d79a314502b11c868045d28bc23efab</id>
<content type='text'>
runtime(matchparen): fix :NoMatchParen not working (vim/vim#14797)

fixes: neovim/neovim#28828

https://github.com/vim/vim/commit/94043780196cc66d23eeec10e2c722c6552324e0</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
runtime(matchparen): fix :NoMatchParen not working (vim/vim#14797)

fixes: neovim/neovim#28828

https://github.com/vim/vim/commit/94043780196cc66d23eeec10e2c722c6552324e0</pre>
</div>
</content>
</entry>
<entry>
<title>vim-patch:9.1.0167: Changing buffer in another window causes it to show matchparen (#27820)</title>
<updated>2024-03-11T23:19:47+00:00</updated>
<author>
<name>zeertzjq</name>
<email>zeertzjq@outlook.com</email>
</author>
<published>2024-03-11T23:19:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=e20e5ecf0afe91c67dc4646df8c9bc286d202bf4'/>
<id>e20e5ecf0afe91c67dc4646df8c9bc286d202bf4</id>
<content type='text'>
Problem:  Changing buffer in another window using win_execute() causes
          it to show matchparen (after 9.0.0969).
Solution: Delay highlighting with SafeState in BufWinEnter.
          (zeertzjq)

closes: vim/vim#14177

https://github.com/vim/vim/commit/49ffb6b428e1e053446ec0209558a8f9d0963ae7</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:  Changing buffer in another window using win_execute() causes
          it to show matchparen (after 9.0.0969).
Solution: Delay highlighting with SafeState in BufWinEnter.
          (zeertzjq)

closes: vim/vim#14177

https://github.com/vim/vim/commit/49ffb6b428e1e053446ec0209558a8f9d0963ae7</pre>
</div>
</content>
</entry>
</feed>
