<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rneovim.git/test/functional/api/command_spec.lua, branch extregs</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>test: simplify functional test expectations</title>
<updated>2026-10-05T16:33:44+00:00</updated>
<author>
<name>Lewis Russell</name>
<email>lewis6991@gmail.com</email>
</author>
<published>2026-10-05T14:37:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=483815ab45cf8fc08804e0cfa95b126493a5dd1f'/>
<id>483815ab45cf8fc08804e0cfa95b126493a5dd1f</id>
<content type='text'>
Problem: Repeated default fields and field-by-field assertions obscure
the values that each functional test is meant to check.

Solution: Add eq_partial() to check selected record fields while
preserving list length and order. Use local helpers to fill fixed
expected defaults where tests need full equality. Keep explicit absence
checks and test-specific values at the call sites.

AI-assisted
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem: Repeated default fields and field-by-field assertions obscure
the values that each functional test is meant to check.

Solution: Add eq_partial() to check selected record fields while
preserving list length and order. Use local helpers to fill fixed
expected defaults where tests need full equality. Keep explicit absence
checks and test-specific values at the call sites.

AI-assisted
</pre>
</div>
</content>
</entry>
<entry>
<title>feat(options): lua closure/function options</title>
<updated>2026-07-31T19:50:04+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2026-07-29T17:09:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=726d1a92d243a8b7cb4b221d64e4523b7a89aaf4'/>
<id>726d1a92d243a8b7cb4b221d64e4523b7a89aaf4</id>
<content type='text'>
Problem:
Cannot assign Lua functions/closures to "func" ('completefunc',
'tagfun', …) or "expr" ('foldexpr', 'indentexpr', …) options.

Solution:
- Store "func"/"expr" options as `Callback` instead of string.
- Delete oceans of copy-pasted code.
- BREAKING: LuaRef returned via RPC/Vimscript is now represented as
  `"&lt;Lua N: file:line&gt;"` (like what `:map` shows) instead of `nil`.
- Note: `man.vim` still uses `v:lua` string, bc it's a vimscript ftplugin.

Helped-by: Lewis Russell &lt;lewis6991@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
Cannot assign Lua functions/closures to "func" ('completefunc',
'tagfun', …) or "expr" ('foldexpr', 'indentexpr', …) options.

Solution:
- Store "func"/"expr" options as `Callback` instead of string.
- Delete oceans of copy-pasted code.
- BREAKING: LuaRef returned via RPC/Vimscript is now represented as
  `"&lt;Lua N: file:line&gt;"` (like what `:map` shows) instead of `nil`.
- Note: `man.vim` still uses `v:lua` string, bc it's a vimscript ftplugin.

Helped-by: Lewis Russell &lt;lewis6991@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test(harness): migrate away from magic globals</title>
<updated>2026-07-21T11:22:39+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2026-07-20T15:16:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=6d8c8b18d551d0be0490640c00fabb816727ec10'/>
<id>6d8c8b18d551d0be0490640c00fabb816727ec10</id>
<content type='text'>
Problem:
The magic globals `it`, `describe`, etc., are more trouble than they are
worth.

- Hooking into `after_each` requires `getfenv()` hacks.
- They confuse luals/emmylua, because the top-level `.luarc.json` isn't
  merged with `test/.luarc.json` (apparently a luals limitation?)
- They totally defeat discoverability because the user just has to
  "know" about the various magic symbols.

So they harm DX, which means they serve no purpose at all.

Solution:
- Expose the test API from `testutil`, so tests can call `t.it()`,
  `t.describe()`, etc., in the conventional way.
- Drop `getfenv()` hacks.
- Drop the `setfenv()` injection in `load_chunk`.
- Drop `test/_meta.lua`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
The magic globals `it`, `describe`, etc., are more trouble than they are
worth.

- Hooking into `after_each` requires `getfenv()` hacks.
- They confuse luals/emmylua, because the top-level `.luarc.json` isn't
  merged with `test/.luarc.json` (apparently a luals limitation?)
- They totally defeat discoverability because the user just has to
  "know" about the various magic symbols.

So they harm DX, which means they serve no purpose at all.

Solution:
- Expose the test API from `testutil`, so tests can call `t.it()`,
  `t.describe()`, etc., in the conventional way.
- Drop `getfenv()` hacks.
- Drop the `setfenv()` injection in `load_chunk`.
- Drop `test/_meta.lua`.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(lua): use even safer and even better error() message conversion</title>
<updated>2026-05-25T09:06:02+00:00</updated>
<author>
<name>bfredl</name>
<email>bjorn.linse@gmail.com</email>
</author>
<published>2026-05-20T19:02:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=24e23de721bb8ddc042e0f11f44f4ff2ff7ebb0b'/>
<id>24e23de721bb8ddc042e0f11f44f4ff2ff7ebb0b</id>
<content type='text'>
problem:
this crashes neovim:

ondska = setmetatable({}, {__tostring = error})
error(ondska)

solution:

make it not crash neovim
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
problem:
this crashes neovim:

ondska = setmetatable({}, {__tostring = error})
error(ondska)

solution:

make it not crash neovim
</pre>
</div>
</content>
</entry>
<entry>
<title>docs: misc, rename "tabpage"</title>
<updated>2026-05-07T08:36:48+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2026-04-30T13:01:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=80d83d75ebea165dfe405b3f17f12b458ad51005'/>
<id>80d83d75ebea165dfe405b3f17f12b458ad51005</id>
<content type='text'>
Co-authored-by: michael-grunder &lt;michael.grunder@gmail.com&gt;
Co-authored-by: Olivia Kinnear &lt;git@superatomic.dev&gt;
Co-authored-by: Felipe Matarazzo &lt;felipemps@protonmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Co-authored-by: michael-grunder &lt;michael.grunder@gmail.com&gt;
Co-authored-by: Olivia Kinnear &lt;git@superatomic.dev&gt;
Co-authored-by: Felipe Matarazzo &lt;felipemps@protonmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>feat(api): nvim_get_commands returns desc #39623</title>
<updated>2026-05-06T10:36:39+00:00</updated>
<author>
<name>glepnir</name>
<email>glephunter@gmail.com</email>
</author>
<published>2026-05-06T10:36:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=1787965d77ae81510357683becb51bb2e9b557fd'/>
<id>1787965d77ae81510357683becb51bb2e9b557fd</id>
<content type='text'>
Problem:
Can't get a command's description from nvim_get_commands when
cmd is string.

Solution:
Returns "desc" field in nvim_get_commands.
`definition` is now empty when cmd is function type.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
Can't get a command's description from nvim_get_commands when
cmd is string.

Solution:
Returns "desc" field in nvim_get_commands.
`definition` is now empty when cmd is function type.</pre>
</div>
</content>
</entry>
<entry>
<title>fix(ui): z=, tselect with async vim.ui.select</title>
<updated>2026-04-30T17:19:42+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2026-04-30T00:23:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=7c4845ff463b63324c4d45f03fdd58b7f70e54ba'/>
<id>7c4845ff463b63324c4d45f03fdd58b7f70e54ba</id>
<content type='text'>
Problem:
After 55ceb31,  z= and tselect don't work if `vim.ui.select` is an async
provider (especially terminal buffers).

Solution:
Drop the `vim.wait()` approach, use an async approach.

fix #39506
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
After 55ceb31,  z= and tselect don't work if `vim.ui.select` is an async
provider (especially terminal buffers).

Solution:
Drop the `vim.wait()` approach, use an async approach.

fix #39506
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(api): leak preview callback LuaRef in nvim_create_user_command #39357</title>
<updated>2026-04-24T18:13:24+00:00</updated>
<author>
<name>Barrett Ruth</name>
<email>62671086+barrettruth@users.noreply.github.com</email>
</author>
<published>2026-04-24T18:13:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=393f687503a319a6f521e8335b4dd8030e3ea67b'/>
<id>393f687503a319a6f521e8335b4dd8030e3ea67b</id>
<content type='text'>
Problem:
Invalid `nvim_create_user_command` calls can leak the
`preview` callback reference after Neovim has taken ownership of it.

1. build with {a,l}san
2. run:
    ```sh
    &lt;path/to/nvim&gt; --headless -u NONE --clean +'lua
    for i = 1, 100 do
      pcall(vim.api.nvim_create_user_command,
        "some very epic stuff" .. i,
        {}, -- NOTE: this is INVALID (not a function or string)
        { preview = function() end })
    end
    vim.cmd("qa!")
    ' +qa
    ```
3. see:
    ```
    100 lua references were leaked!
    ```

Solution:
Clear `preview_luaref` in `err:`.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
Invalid `nvim_create_user_command` calls can leak the
`preview` callback reference after Neovim has taken ownership of it.

1. build with {a,l}san
2. run:
    ```sh
    &lt;path/to/nvim&gt; --headless -u NONE --clean +'lua
    for i = 1, 100 do
      pcall(vim.api.nvim_create_user_command,
        "some very epic stuff" .. i,
        {}, -- NOTE: this is INVALID (not a function or string)
        { preview = function() end })
    end
    vim.cmd("qa!")
    ' +qa
    ```
3. see:
    ```
    100 lua references were leaked!
    ```

Solution:
Clear `preview_luaref` in `err:`.</pre>
</div>
</content>
</entry>
<entry>
<title>docs: misc</title>
<updated>2025-12-07T01:33:02+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2025-11-26T06:17:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=ebb7c38ca2e59ca7b413750d83ac1cf38d7bb180'/>
<id>ebb7c38ca2e59ca7b413750d83ac1cf38d7bb180</id>
<content type='text'>
fix https://github.com/neovim/neovim.github.io/issues/419

Co-authored-by: Rob Pilling &lt;robpilling@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
fix https://github.com/neovim/neovim.github.io/issues/419

Co-authored-by: Rob Pilling &lt;robpilling@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>feat(api): nvim_get_commands returns function fields #36415</title>
<updated>2025-11-26T05:12:39+00:00</updated>
<author>
<name>Rob Pilling</name>
<email>robpilling@gmail.com</email>
</author>
<published>2025-11-26T05:12:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=612b2e78508757be5b7a3ef0e9bf1ed0f0b27cd2'/>
<id>612b2e78508757be5b7a3ef0e9bf1ed0f0b27cd2</id>
<content type='text'>
Problem:
nvim_get_commands does not return callbacks defined for
"preview", "complete", or the command itself.

Solution:
- Return Lua function as "callback" field in a Lua context.
- Return "preview" function in a Lua context.
- BREAKING: Return "complete" as a function instead of a boolean.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
nvim_get_commands does not return callbacks defined for
"preview", "complete", or the command itself.

Solution:
- Return Lua function as "callback" field in a Lua context.
- Return "preview" function in a Lua context.
- BREAKING: Return "complete" as a function instead of a boolean.</pre>
</div>
</content>
</entry>
</feed>
