<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rneovim.git/runtime/plugin, branch userregs_2</title>
<subtitle>Neovim fork with Rahm's personal hacks.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/'/>
<entry>
<title>feat(userregfunc): programmable user-defined registers with multibyte support</title>
<updated>2025-04-16T17:41:19+00:00</updated>
<author>
<name>Josh Rahm</name>
<email>joshuarahm@gmail.com</email>
</author>
<published>2025-04-09T23:46:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=2034a8419e1c5675592cdd0d0ffeaadfda58001a'/>
<id>2034a8419e1c5675592cdd0d0ffeaadfda58001a</id>
<content type='text'>
This patch introduces a new global option `userregfunc`, allowing users
to define custom behavior for registers not handled by Neovim
internally. This enables programmable registers using any Unicode
character — including multibyte characters.

- A new register slot `USER_REGISTER` is introduced. Any register not
  matching the standard set (`0-9a-zA-Z"+-*%#/:.=`, etc.) is routed
  through this system.

- When such a register is accessed, the function defined in
  `userregfunc` is called with three arguments:

    1. `{action}` (string): either `"yank"` or `"put"`
    2. `{register}` (string): UTF-8 character name of the register
    3. `{content}`:
       - If `action == "yank"`: a dictionary with these keys:
         - `lines` (list of strings): the yanked text
         - `type` (string): one of `"v"` (charwise), `"V"` (linewise), or `"b"` (blockwise)
         - `width` (number, optional): present if `type == "b"`
         - `additional_data` (dict, optional): user-extensible metadata
       - If `action == "put"`: this is always `v:null`

- The function may return either:
    - A **string** (used as a charwise register), or
    - A **dictionary** matching the structure above

- Internally, `read_userregister()` and `write_userregister()` convert
  between `yankreg_T` and typval dictionaries.

- Messages and internal logic fully support multibyte register names via
  UTF-8.

- A new `USER_REGISTER` slot is used for logical separation in the
  register table.

Included in this patch is an extensible Lua framework (`vim.userregs`)
for defining user register handlers in Lua. It provides per-register
handlers via `register_handler(registers, handler)`

The global function `_G.def_userreg_func` is registered as the default
implementation of `'userregfunc'`, enabling seamless integration with
the Lua framework.

- Register `λ` dynamically inserts the current date
- Register `&amp;` reads and writes from a "global register" file under
  `stdpath("run")`
- Register `?` returns the result of a shell command
- Registers that auto-adjust based on filetype, cursor context, or
  Treesitter nodes

This change expands the register model into a programmable abstraction —
fully scriptable and extensible — without breaking compatibility.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch introduces a new global option `userregfunc`, allowing users
to define custom behavior for registers not handled by Neovim
internally. This enables programmable registers using any Unicode
character — including multibyte characters.

- A new register slot `USER_REGISTER` is introduced. Any register not
  matching the standard set (`0-9a-zA-Z"+-*%#/:.=`, etc.) is routed
  through this system.

- When such a register is accessed, the function defined in
  `userregfunc` is called with three arguments:

    1. `{action}` (string): either `"yank"` or `"put"`
    2. `{register}` (string): UTF-8 character name of the register
    3. `{content}`:
       - If `action == "yank"`: a dictionary with these keys:
         - `lines` (list of strings): the yanked text
         - `type` (string): one of `"v"` (charwise), `"V"` (linewise), or `"b"` (blockwise)
         - `width` (number, optional): present if `type == "b"`
         - `additional_data` (dict, optional): user-extensible metadata
       - If `action == "put"`: this is always `v:null`

- The function may return either:
    - A **string** (used as a charwise register), or
    - A **dictionary** matching the structure above

- Internally, `read_userregister()` and `write_userregister()` convert
  between `yankreg_T` and typval dictionaries.

- Messages and internal logic fully support multibyte register names via
  UTF-8.

- A new `USER_REGISTER` slot is used for logical separation in the
  register table.

Included in this patch is an extensible Lua framework (`vim.userregs`)
for defining user register handlers in Lua. It provides per-register
handlers via `register_handler(registers, handler)`

The global function `_G.def_userreg_func` is registered as the default
implementation of `'userregfunc'`, enabling seamless integration with
the Lua framework.

- Register `λ` dynamically inserts the current date
- Register `&amp;` reads and writes from a "global register" file under
  `stdpath("run")`
- Register `?` returns the result of a shell command
- Registers that auto-adjust based on filetype, cursor context, or
  Treesitter nodes

This change expands the register model into a programmable abstraction —
fully scriptable and extensible — without breaking compatibility.
</pre>
</div>
</content>
</entry>
<entry>
<title>vim-patch:a359c9c: runtime(zip): add *.whl to the list of zip extensions</title>
<updated>2025-04-02T22:47:58+00:00</updated>
<author>
<name>zeertzjq</name>
<email>zeertzjq@outlook.com</email>
</author>
<published>2025-04-02T22:47:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=8e2a9cbaa38eb26a614d3acc2179d123108ce37f'/>
<id>8e2a9cbaa38eb26a614d3acc2179d123108ce37f</id>
<content type='text'>
This commits adds the extension *.whl to the list of zip extensions.
Wheel (WHL) files are binary distribution files for python packages.

Reference:
https://packaging.python.org/en/latest/specifications/binary-distribution-format/

fixes: vim/vim#17038

https://github.com/vim/vim/commit/a359c9c25e5c3c1e543fc720223aa7256e6f72cf

Co-authored-by: Christian Brabandt &lt;cb@256bit.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commits adds the extension *.whl to the list of zip extensions.
Wheel (WHL) files are binary distribution files for python packages.

Reference:
https://packaging.python.org/en/latest/specifications/binary-distribution-format/

fixes: vim/vim#17038

https://github.com/vim/vim/commit/a359c9c25e5c3c1e543fc720223aa7256e6f72cf

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='https://git.josher.dev/cgit/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>fix: update osc52 termfeatures flag on UIEnter/UILeave (#32756)</title>
<updated>2025-03-12T13:11:19+00:00</updated>
<author>
<name>Gregory Anders</name>
<email>greg@gpanders.com</email>
</author>
<published>2025-03-12T13:11:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=04181070746a51d2f11ce5fc96d2696ea267ff70'/>
<id>04181070746a51d2f11ce5fc96d2696ea267ff70</id>
<content type='text'>
Problem:

Nvim tries to use OSC 52 even when no TUIs are attached.

Solution:

On each UIEnter/UILeave event, check that there is a TUI client connected to Nvim's stdout.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:

Nvim tries to use OSC 52 even when no TUIs are attached.

Solution:

On each UIEnter/UILeave event, check that there is a TUI client connected to Nvim's stdout.</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='https://git.josher.dev/cgit/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>vim-patch:56957ed: runtime(misc): add support for bzip3 to tar, vimball and gzip plugins</title>
<updated>2025-03-01T12:21:55+00:00</updated>
<author>
<name>Christian Clason</name>
<email>c.clason@uni-graz.at</email>
</author>
<published>2025-03-01T10:37:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=48e6147e64b819d2a4130697bb348dcd368a4391'/>
<id>48e6147e64b819d2a4130697bb348dcd368a4391</id>
<content type='text'>
fixes: vim/vim#16751
closes: vim/vim#16755

https://github.com/vim/vim/commit/56957ed4109fb0c37922c6c37d5926cfe0a3313b

Co-authored-by: Jim Zhou &lt;jimzhouzzy@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
fixes: vim/vim#16751
closes: vim/vim#16755

https://github.com/vim/vim/commit/56957ed4109fb0c37922c6c37d5926cfe0a3313b

Co-authored-by: Jim Zhou &lt;jimzhouzzy@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vim-patch:b69cd52: runtime(misc): Add support for lz4 to tar &amp; gzip plugin (#32360)</title>
<updated>2025-02-07T09:10:51+00:00</updated>
<author>
<name>zeertzjq</name>
<email>zeertzjq@outlook.com</email>
</author>
<published>2025-02-07T09:10:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=52ff5e3032eb5e39b49ce6f4e9a93cffdd39b830'/>
<id>52ff5e3032eb5e39b49ce6f4e9a93cffdd39b830</id>
<content type='text'>
while at it, clean up the tar plugin a bit and sort the patterns for the
tar and gzip plugin

References:
- https://github.com/lz4/lz4
- https://lz4.org/

closes: vim/vim#16591

https://github.com/vim/vim/commit/b69cd52447584cedadc1513aa3acd5b4cd9f4340

Co-authored-by: Corpulent Robin &lt;177767857+corpulentrobin@users.noreply.github.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
while at it, clean up the tar plugin a bit and sort the patterns for the
tar and gzip plugin

References:
- https://github.com/lz4/lz4
- https://lz4.org/

closes: vim/vim#16591

https://github.com/vim/vim/commit/b69cd52447584cedadc1513aa3acd5b4cd9f4340

Co-authored-by: Corpulent Robin &lt;177767857+corpulentrobin@users.noreply.github.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>vim-patch:9cfdabb: runtime(netrw): change netrw maintainer</title>
<updated>2025-01-18T08:49:35+00:00</updated>
<author>
<name>Christian Clason</name>
<email>c.clason@uni-graz.at</email>
</author>
<published>2025-01-17T12:48:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=e962167245755e900a7bd154075106026dbb4eff'/>
<id>e962167245755e900a7bd154075106026dbb4eff</id>
<content type='text'>
Dr. Chip retired some time ago and is no longer maintaining the netrw
plugin. However as a runtime plugin distributed by Vim, it important to
maintain the netrw plugin in the future and fix bugs as they are
reported.

So, split out the netrw plugin as an additional package, however include
some stubs to make sure the plugin is still loaded by default and the
documentation is accessible as well.

closes: vim/vim#16368

https://github.com/vim/vim/commit/9cfdabb074feefc9848e9f7a4538f201e28c7f06

Co-authored-by: Luca Saccarola &lt;github.e41mv@aleeas.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Dr. Chip retired some time ago and is no longer maintaining the netrw
plugin. However as a runtime plugin distributed by Vim, it important to
maintain the netrw plugin in the future and fix bugs as they are
reported.

So, split out the netrw plugin as an additional package, however include
some stubs to make sure the plugin is still loaded by default and the
documentation is accessible as well.

closes: vim/vim#16368

https://github.com/vim/vim/commit/9cfdabb074feefc9848e9f7a4538f201e28c7f06

Co-authored-by: Luca Saccarola &lt;github.e41mv@aleeas.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor: use nvim.foo.bar format for autocommand groups</title>
<updated>2025-01-15T05:25:25+00:00</updated>
<author>
<name>Maria José Solano</name>
<email>majosolano99@gmail.com</email>
</author>
<published>2025-01-14T03:45:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=09e01437c968be4c6e9f6bb3ac8811108c58008c'/>
<id>09e01437c968be4c6e9f6bb3ac8811108c58008c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</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='https://git.josher.dev/cgit/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>
</feed>
