<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rneovim.git/test/functional/api/command_spec.lua, branch fix_semantic_tokens_pull</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>feat(api): add command name to Lua command callback opts</title>
<updated>2022-11-07T16:27:37+00:00</updated>
<author>
<name>Famiu Haque</name>
<email>famiuhaque@protonmail.com</email>
</author>
<published>2022-11-07T16:27:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=c022140ec6a66402e405152054b6ab0141940419'/>
<id>c022140ec6a66402e405152054b6ab0141940419</id>
<content type='text'>
Adds a `name` key to the opts dict passed to Lua command callbacks
created using `nvim_create_user_command()`. This is useful for when
multiple commands use the same callback.

Note that this kind of behavior is not as strange as one might think,
even some internal Neovim commands reuse the same internal C function,
differing their behavior by checking the command name. `substitute`,
`smagic` and `snomagic` are examples of that.

This will also be useful for generalized Lua command preview functions
that can preview a wide range of commands, in which case knowing the
command name is necessary for the preview function to actually be able
to execute the command that it's supposed to preview.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Adds a `name` key to the opts dict passed to Lua command callbacks
created using `nvim_create_user_command()`. This is useful for when
multiple commands use the same callback.

Note that this kind of behavior is not as strange as one might think,
even some internal Neovim commands reuse the same internal C function,
differing their behavior by checking the command name. `substitute`,
`smagic` and `snomagic` are examples of that.

This will also be useful for generalized Lua command preview functions
that can preview a wide range of commands, in which case knowing the
command name is necessary for the preview function to actually be able
to execute the command that it's supposed to preview.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(lua): fix architecture-dependent behavior in usercmd "reg" (#20384)</title>
<updated>2022-09-28T10:27:59+00:00</updated>
<author>
<name>zeertzjq</name>
<email>zeertzjq@outlook.com</email>
</author>
<published>2022-09-28T10:27:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=35e2c4a2edd28f72c48c70530c5486365c2502a4'/>
<id>35e2c4a2edd28f72c48c70530c5486365c2502a4</id>
<content type='text'>
I don't think using an integer as a NUL-terminated string can work on
big-endian systems, at least.

This is also not tested. Add a test.

Also fix a mistake in the docs of nvim_parse_cmd.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I don't think using an integer as a NUL-terminated string can work on
big-endian systems, at least.

This is also not tested. Add a test.

Also fix a mistake in the docs of nvim_parse_cmd.</pre>
</div>
</content>
</entry>
<entry>
<title>fix(api)!: correctly deal with number before :tab</title>
<updated>2022-09-02T14:28:57+00:00</updated>
<author>
<name>zeertzjq</name>
<email>zeertzjq@outlook.com</email>
</author>
<published>2022-09-01T10:46:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=1ef7720567b08caec0c077605fb2a01a9d6eafbc'/>
<id>1ef7720567b08caec0c077605fb2a01a9d6eafbc</id>
<content type='text'>
Now nvim_parse_cmd and nvim_create_user_command use a "tab" value which
is the same as the number passed before :tab modifier instead of the
number plus 1, and "tab" value is -1 if :tab modifier is not used.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now nvim_parse_cmd and nvim_create_user_command use a "tab" value which
is the same as the number passed before :tab modifier instead of the
number plus 1, and "tab" value is -1 if :tab modifier is not used.
</pre>
</div>
</content>
</entry>
<entry>
<title>feat(api): add support for :horizontal modifier</title>
<updated>2022-09-01T12:53:43+00:00</updated>
<author>
<name>zeertzjq</name>
<email>zeertzjq@outlook.com</email>
</author>
<published>2022-09-01T12:32:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=689f5d604e59eba1ddab6f91b458a8163dc6629d'/>
<id>689f5d604e59eba1ddab6f91b458a8163dc6629d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(usercmd): also check for whitespace after escaped character (#19942)</title>
<updated>2022-08-25T09:57:32+00:00</updated>
<author>
<name>zeertzjq</name>
<email>zeertzjq@outlook.com</email>
</author>
<published>2022-08-25T09:57:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=274e1122ade42095cd5b6416e70bda3aa0cb0423'/>
<id>274e1122ade42095cd5b6416e70bda3aa0cb0423</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(api/command): fargs behavior when no arguments are passed (#19862)</title>
<updated>2022-08-21T13:19:29+00:00</updated>
<author>
<name>Javier Lopez</name>
<email>graulopezjavier@gmail.com</email>
</author>
<published>2022-08-21T13:19:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=dde90f0ca4e394667afe39c18f4a4dabdd8a6666'/>
<id>dde90f0ca4e394667afe39c18f4a4dabdd8a6666</id>
<content type='text'>
Problem: A command defined with `nargs="?"` returns `fargs={""}` to
a Lua callback when executed with no arguments, which is inconsistent
with how`nargs="*"` behaves.

Solution: Pass `fargs={}` for no argument with `nargs="?"` as well.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem: A command defined with `nargs="?"` returns `fargs={""}` to
a Lua callback when executed with no arguments, which is inconsistent
with how`nargs="*"` behaves.

Solution: Pass `fargs={}` for no argument with `nargs="?"` as well.</pre>
</div>
</content>
</entry>
<entry>
<title>feat(api): add `unsilent` to command APIs</title>
<updated>2022-07-02T20:34:28+00:00</updated>
<author>
<name>zeertzjq</name>
<email>zeertzjq@outlook.com</email>
</author>
<published>2022-07-02T11:35:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=7a907c3314f939a3d2983ac07edc5c9672957352'/>
<id>7a907c3314f939a3d2983ac07edc5c9672957352</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(nvim_create_user_command): make `smods` work with `nvim_cmd`</title>
<updated>2022-06-08T09:24:52+00:00</updated>
<author>
<name>Famiu Haque</name>
<email>famiuhaque@protonmail.com</email>
</author>
<published>2022-06-08T03:06:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=c84bd9e21fb1e5c55c9c5370b07271a6ae96f19c'/>
<id>c84bd9e21fb1e5c55c9c5370b07271a6ae96f19c</id>
<content type='text'>
Closes #18876.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Closes #18876.
</pre>
</div>
</content>
</entry>
<entry>
<title>feat: add preview functionality to user commands</title>
<updated>2022-05-31T14:55:05+00:00</updated>
<author>
<name>Famiu Haque</name>
<email>famiuhaque@protonmail.com</email>
</author>
<published>2022-04-20T11:02:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=46536f53e82967dcac8d030ee3394cdb156f9603'/>
<id>46536f53e82967dcac8d030ee3394cdb156f9603</id>
<content type='text'>
Adds a Lua-only `preview` flag to user commands which allows the command to be incrementally previewed like `:substitute` when 'inccommand' is set.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Adds a Lua-only `preview` flag to user commands which allows the command to be incrementally previewed like `:substitute` when 'inccommand' is set.
</pre>
</div>
</content>
</entry>
<entry>
<title>feat(nvim_create_user_command): pass structured modifiers to commands</title>
<updated>2022-05-29T04:52:30+00:00</updated>
<author>
<name>Famiu Haque</name>
<email>famiuhaque@protonmail.com</email>
</author>
<published>2022-05-29T04:42:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=9988d2f214963b3cac70026d6ad4bb058837afd9'/>
<id>9988d2f214963b3cac70026d6ad4bb058837afd9</id>
<content type='text'>
Adds an `smods` key to `nvim_create_user_command` Lua command callbacks,
which has command modifiers but in a structured format. This removes the
need to manually parse command modifiers. It also reduces friction in
using `nvim_cmd` inside a Lua command callback.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Adds an `smods` key to `nvim_create_user_command` Lua command callbacks,
which has command modifiers but in a structured format. This removes the
need to manually parse command modifiers. It also reduces friction in
using `nvim_cmd` inside a Lua command callback.
</pre>
</div>
</content>
</entry>
</feed>
