<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rneovim.git/src/nvim/msgpack_rpc, 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>docs: news, lsp autocomplete #33047</title>
<updated>2025-03-26T12:49:48+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2025-03-26T12:49:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=8a7e1b19b9bf6cf3d081ca9d87bbe0045f93d556'/>
<id>8a7e1b19b9bf6cf3d081ca9d87bbe0045f93d556</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(channel): log after (not before) channel-close</title>
<updated>2025-03-24T16:48:19+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2025-03-24T16:48:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=c49162be595852c04c56c14a1997e25ac69b7312'/>
<id>c49162be595852c04c56c14a1997e25ac69b7312</id>
<content type='text'>
Problem:
chan_close_on_err() writes to the log file before peforming its actual
work. This could be slightly misleading in terms of log timestamps, or
could delay important work on Windows where file-open/write can be slow.

Solution:
Log after closing the channel, instead of before.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
chan_close_on_err() writes to the log file before peforming its actual
work. This could be slightly misleading in terms of log timestamps, or
could delay important work on Windows where file-open/write can be slow.

Solution:
Log after closing the channel, instead of before.
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor(channel): redundant channel_close()</title>
<updated>2025-03-24T16:38:34+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2025-03-24T16:38:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=e73a3f1edc3ea9fe990a58f4269269c2d51fcff8'/>
<id>e73a3f1edc3ea9fe990a58f4269269c2d51fcff8</id>
<content type='text'>
Problem:
`receive_msgpack()` calls `channel_close()` just before calling
`chan_close_on_err()`, even though `chan_close_on_err()` always calls
`channel_close()`.

Solution:
Remove the redunant `channel_close()` in `receive_msgpack()`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
`receive_msgpack()` calls `channel_close()` just before calling
`chan_close_on_err()`, even though `chan_close_on_err()` always calls
`channel_close()`.

Solution:
Remove the redunant `channel_close()` in `receive_msgpack()`.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(ui): schedule UI detach (#32827)</title>
<updated>2025-03-11T20:35:12+00:00</updated>
<author>
<name>Gregory Anders</name>
<email>greg@gpanders.com</email>
</author>
<published>2025-03-11T20:35:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=6b8c56c7f6dae922d874b34ca95d0e7ff2496944'/>
<id>6b8c56c7f6dae922d874b34ca95d0e7ff2496944</id>
<content type='text'>
When a UI detaches it will execute any UILeave events. Autocommands
cannot run in a libuv handler because they will in turn poll the event
loop, which results in recursive loop execution. So we schedule the
callback to detach the UI on the main event queue.

We also have to schedule the exit when the RPC channel is closed to
ensure it does not run until after `remote_ui_disconnect` has run,
otherwise it will hang.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When a UI detaches it will execute any UILeave events. Autocommands
cannot run in a libuv handler because they will in turn poll the event
loop, which results in recursive loop execution. So we schedule the
callback to detach the UI on the main event queue.

We also have to schedule the exit when the RPC channel is closed to
ensure it does not run until after `remote_ui_disconnect` has run,
otherwise it will hang.</pre>
</div>
</content>
</entry>
<entry>
<title>refactor(channel): eliminate special case in on_proc_exit() #32485</title>
<updated>2025-02-17T10:26:19+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2025-02-17T10:26:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=b360c0608556232c8ddb7ecc9cd26e68584bee76'/>
<id>b360c0608556232c8ddb7ecc9cd26e68584bee76</id>
<content type='text'>
Problem:
on_proc_exit() has a special-case that assumes that the UI client will
never spawn more than 1 child process.

Solution:
If the Nvim server exits, the stream EOF will trigger `rpc_close()` in
the UI client, so we don't need the special case in `on_proc_exit`.
Pass `Channel.exit_status` from `rpc_close()` so that the correct exit
code is reflected.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
on_proc_exit() has a special-case that assumes that the UI client will
never spawn more than 1 child process.

Solution:
If the Nvim server exits, the stream EOF will trigger `rpc_close()` in
the UI client, so we don't need the special case in `on_proc_exit`.
Pass `Channel.exit_status` from `rpc_close()` so that the correct exit
code is reflected.</pre>
</div>
</content>
</entry>
<entry>
<title>feat(ui): UI :detach command</title>
<updated>2025-02-10T17:56:11+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2025-02-09T21:04:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=4b0e2605eaf90268195029a29f10903dc82729e7'/>
<id>4b0e2605eaf90268195029a29f10903dc82729e7</id>
<content type='text'>
Problem:
Cannot detach the current UI.

Solution:
- Introduce `:detach`.
- Introduce `Channel.detach`.

Co-authored-by: bfredl &lt;bjorn.linse@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
Cannot detach the current UI.

Solution:
- Introduce `:detach`.
- Introduce `Channel.detach`.

Co-authored-by: bfredl &lt;bjorn.linse@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(log): RPC log format #32337</title>
<updated>2025-02-05T21:23:33+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2025-02-05T21:23:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=44740e561fc93afe3ebecfd3618bda2d2abeafb0'/>
<id>44740e561fc93afe3ebecfd3618bda2d2abeafb0</id>
<content type='text'>
Problem:
RPC log messages show `log_notify` function name, which is not useful:

    DBG 2025-02-04T22:28:02.419 ui.37862   log_notify:57: RPC -&gt; 3: [notify]    nvim_ui_set_focus
    DBG 2025-02-04T22:28:02.419 nvim.37863.0 log_notify:57: RPC &lt;- 1: [notify]    nvim_ui_set_focus

Solution:
Call logmsg() directly.

    DBG 2025-02-04T22:42:00.104 ui.40680   RPC: -&gt; 3: [notify]    nvim_ui_attach
    DBG 2025-02-04T22:42:00.104 ui.40680   RPC: -&gt; 3: [notify]    nvim_set_client_info</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
RPC log messages show `log_notify` function name, which is not useful:

    DBG 2025-02-04T22:28:02.419 ui.37862   log_notify:57: RPC -&gt; 3: [notify]    nvim_ui_set_focus
    DBG 2025-02-04T22:28:02.419 nvim.37863.0 log_notify:57: RPC &lt;- 1: [notify]    nvim_ui_set_focus

Solution:
Call logmsg() directly.

    DBG 2025-02-04T22:42:00.104 ui.40680   RPC: -&gt; 3: [notify]    nvim_ui_attach
    DBG 2025-02-04T22:42:00.104 ui.40680   RPC: -&gt; 3: [notify]    nvim_set_client_info</pre>
</div>
</content>
</entry>
<entry>
<title>refactor: iwyu #31637</title>
<updated>2024-12-23T13:43:52+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2024-12-23T13:43:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=2a7d0ed6145bf3f8b139c2694563f460f829813a'/>
<id>2a7d0ed6145bf3f8b139c2694563f460f829813a</id>
<content type='text'>
Result of `make iwyu` (after some "fixups").</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Result of `make iwyu` (after some "fixups").</pre>
</div>
</content>
</entry>
<entry>
<title>refactor(api)!: rename Dictionary =&gt; Dict</title>
<updated>2024-09-23T12:42:57+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2024-09-20T05:34:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=737f58e23230ea14f1648ac1fc7f442ea0f8563c'/>
<id>737f58e23230ea14f1648ac1fc7f442ea0f8563c</id>
<content type='text'>
In the api_info() output:

    :new|put =map(filter(api_info().functions, '!has_key(v:val,''deprecated_since'')'), 'v:val')
    ...

    {'return_type': 'ArrayOf(Integer, 2)', 'name': 'nvim_win_get_position', 'method': v:true, 'parameters': [['Window', 'window']], 'since': 1}

The `ArrayOf(Integer, 2)` return type didn't break clients when we added
it, which is evidence that clients don't use the `return_type` field,
thus renaming Dictionary =&gt; Dict in api_info() is not (in practice)
a breaking change.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In the api_info() output:

    :new|put =map(filter(api_info().functions, '!has_key(v:val,''deprecated_since'')'), 'v:val')
    ...

    {'return_type': 'ArrayOf(Integer, 2)', 'name': 'nvim_win_get_position', 'method': v:true, 'parameters': [['Window', 'window']], 'since': 1}

The `ArrayOf(Integer, 2)` return type didn't break clients when we added
it, which is evidence that clients don't use the `return_type` field,
thus renaming Dictionary =&gt; Dict in api_info() is not (in practice)
a breaking change.
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor: rename "process" =&gt; "proc" #30387</title>
<updated>2024-09-15T19:20:58+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2024-09-15T19:20:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.josher.dev/cgit/rneovim.git/commit/?id=057d27a9d6ef0bb2ee5130704c45b9e9197e7c36'/>
<id>057d27a9d6ef0bb2ee5130704c45b9e9197e7c36</id>
<content type='text'>
Problem:
- "process" is often used as a verb (`multiqueue_process_events`), which
  is ambiguous for cases where it's used as a topic.
- The documented naming convention for processes is "proc".
  - `:help dev-name-common`
- Shorter is better, when it doesn't harm readability or
  discoverability.

Solution:
Rename "process" =&gt; "proc" in all C symbols and module names.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
- "process" is often used as a verb (`multiqueue_process_events`), which
  is ambiguous for cases where it's used as a topic.
- The documented naming convention for processes is "proc".
  - `:help dev-name-common`
- Shorter is better, when it doesn't harm readability or
  discoverability.

Solution:
Rename "process" =&gt; "proc" in all C symbols and module names.</pre>
</div>
</content>
</entry>
</feed>
