<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rneovim.git/runtime/lua/vim/_meta/builtin.lua, branch rahm</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(ui)!: emit prompt "messages" as cmdline events #31525</title>
<updated>2025-01-02T13:51:03+00:00</updated>
<author>
<name>luukvbaal</name>
<email>luukvbaal@gmail.com</email>
</author>
<published>2025-01-02T13:51:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=48e2a73610ca5639408f79b3d8eebd3e5f57a327'/>
<id>48e2a73610ca5639408f79b3d8eebd3e5f57a327</id>
<content type='text'>
Problem:  Prompts are emitted as messages events, where cmdline events
          are more appropriate. The user input is also emitted as
          message events in fast context, so cannot be displayed with
          vim.ui_attach().
Solution: Prompt for user input through cmdline prompts.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:  Prompts are emitted as messages events, where cmdline events
          are more appropriate. The user input is also emitted as
          message events in fast context, so cannot be displayed with
          vim.ui_attach().
Solution: Prompt for user input through cmdline prompts.</pre>
</div>
</content>
</entry>
<entry>
<title>fix(ui): no fast context for prompt message kinds #31224</title>
<updated>2024-11-15T22:34:42+00:00</updated>
<author>
<name>luukvbaal</name>
<email>luukvbaal@gmail.com</email>
</author>
<published>2024-11-15T22:34:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=6e4df18b457e9743c34068fd6e0a89fd04d3526c'/>
<id>6e4df18b457e9743c34068fd6e0a89fd04d3526c</id>
<content type='text'>
Problem:  No longer able to show prompt messages with vim.ui_attach().
Solution: Do not execute callback in fast context for prompt message
          kinds. These events must be safe to show the incoming message
          so the event itself serves to indicate that the message
          should be shown immediately.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:  No longer able to show prompt messages with vim.ui_attach().
Solution: Do not execute callback in fast context for prompt message
          kinds. These events must be safe to show the incoming message
          so the event itself serves to indicate that the message
          should be shown immediately.</pre>
</div>
</content>
</entry>
<entry>
<title>fix(messages)!: vim.ui_attach message callbacks are unsafe</title>
<updated>2024-11-14T12:23:11+00:00</updated>
<author>
<name>Luuk van Baal</name>
<email>luukvbaal@gmail.com</email>
</author>
<published>2024-06-20T12:48:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=de48fbbd5f8800bd7f1909a6fb41e53e871cf74c'/>
<id>de48fbbd5f8800bd7f1909a6fb41e53e871cf74c</id>
<content type='text'>
Problem:  Lua callbacks for "msg_show" events with vim.ui_attach() are
          executed when it is not safe.
Solution: Disallow non-fast API calls for "msg_show" event callbacks.
          Automatically detach callback after excessive errors.
          Make sure fast APIs do not modify Nvim state.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:  Lua callbacks for "msg_show" events with vim.ui_attach() are
          executed when it is not safe.
Solution: Disallow non-fast API calls for "msg_show" event callbacks.
          Automatically detach callback after excessive errors.
          Make sure fast APIs do not modify Nvim state.
</pre>
</div>
</content>
</entry>
<entry>
<title>feat(stdlib): overload vim.str_byteindex, vim.str_utfindex #30735</title>
<updated>2024-10-23T13:33:57+00:00</updated>
<author>
<name>Tristan Knight</name>
<email>admin@snappeh.com</email>
</author>
<published>2024-10-23T13:33:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=230b0c7f021a57647a658edce27fe115343f083f'/>
<id>230b0c7f021a57647a658edce27fe115343f083f</id>
<content type='text'>
PROBLEM:
There are several limitations to vim.str_byteindex, vim.str_utfindex:
1. They throw given out-of-range indexes. An invalid (often user/lsp-provided)
   index doesn't feel exceptional and should be handled by the caller.
   `:help dev-error-patterns` suggests that `retval, errmsg` is the preferred
   way to handle this kind of failure.
2. They cannot accept an encoding. So LSP needs wrapper functions. #25272
3. The current signatures are not extensible.
    * Calling: The function currently uses a fairly opaque boolean value to
      indicate to identify the encoding.
    * Returns: The fact it can throw requires wrapping in pcall.
4. The current name doesn't follow suggestions in `:h dev-naming` and I think
   `get` would be suitable.

SOLUTION:
- Because these are performance-sensitive, don't introduce `opts`.
- Introduce an "overload" that accepts `encoding:string` and
  `strict_indexing:bool` params.

```lua
local col = vim.str_utfindex(line, encoding, [index, [no_out_of_range]])
```

Support the old versions by dispatching on the type of argument 2, and
deprecate that form.

```lua
vim.str_utfindex(line)                             -- (utf-32 length, utf-16 length), deprecated
vim.str_utfindex(line, index)                      -- (utf-32 index, utf-16 index), deprecated
vim.str_utfindex(line, 'utf-16')                   -- utf-16 length
vim.str_utfindex(line, 'utf-16', index)            -- utf-16 index
vim.str_utfindex(line, 'utf-16', math.huge)        -- error: index out of range
vim.str_utfindex(line, 'utf-16', math.huge, false) -- utf-16 length
```</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PROBLEM:
There are several limitations to vim.str_byteindex, vim.str_utfindex:
1. They throw given out-of-range indexes. An invalid (often user/lsp-provided)
   index doesn't feel exceptional and should be handled by the caller.
   `:help dev-error-patterns` suggests that `retval, errmsg` is the preferred
   way to handle this kind of failure.
2. They cannot accept an encoding. So LSP needs wrapper functions. #25272
3. The current signatures are not extensible.
    * Calling: The function currently uses a fairly opaque boolean value to
      indicate to identify the encoding.
    * Returns: The fact it can throw requires wrapping in pcall.
4. The current name doesn't follow suggestions in `:h dev-naming` and I think
   `get` would be suitable.

SOLUTION:
- Because these are performance-sensitive, don't introduce `opts`.
- Introduce an "overload" that accepts `encoding:string` and
  `strict_indexing:bool` params.

```lua
local col = vim.str_utfindex(line, encoding, [index, [no_out_of_range]])
```

Support the old versions by dispatching on the type of argument 2, and
deprecate that form.

```lua
vim.str_utfindex(line)                             -- (utf-32 length, utf-16 length), deprecated
vim.str_utfindex(line, index)                      -- (utf-32 index, utf-16 index), deprecated
vim.str_utfindex(line, 'utf-16')                   -- utf-16 length
vim.str_utfindex(line, 'utf-16', index)            -- utf-16 index
vim.str_utfindex(line, 'utf-16', math.huge)        -- error: index out of range
vim.str_utfindex(line, 'utf-16', math.huge, false) -- utf-16 length
```</pre>
</div>
</content>
</entry>
<entry>
<title>docs: render `@since` versions, 0 means experimental #30649</title>
<updated>2024-10-04T09:13:31+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2024-10-04T09:13:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=b45c50f3140e7ece593f2126840900f5cc3d39ea'/>
<id>b45c50f3140e7ece593f2126840900f5cc3d39ea</id>
<content type='text'>
An implication of this current approach is that `NVIM_API_LEVEL` should be
bumped when a new Lua function is added.

TODO(future): add a lint check which requires `@since` on all new functions.

ref #25416</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
An implication of this current approach is that `NVIM_API_LEVEL` should be
bumped when a new Lua function is added.

TODO(future): add a lint check which requires `@since` on all new functions.

ref #25416</pre>
</div>
</content>
</entry>
<entry>
<title>docs: improve luacats support #30580</title>
<updated>2024-10-03T10:45:51+00:00</updated>
<author>
<name>James Trew</name>
<email>66286082+jamestrew@users.noreply.github.com</email>
</author>
<published>2024-10-03T10:45:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=385fbfb3e739b457027b469782678f86eefdf7fc'/>
<id>385fbfb3e739b457027b469782678f86eefdf7fc</id>
<content type='text'>
Some composite/compound types even as basic as `(string|number)[]` are
not currently supported by the luacats LPEG grammar used by gen_vimdoc.
It would be parsed &amp; rendered as just `string|number`.

Changeset adds better support for these types.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some composite/compound types even as basic as `(string|number)[]` are
not currently supported by the luacats LPEG grammar used by gen_vimdoc.
It would be parsed &amp; rendered as just `string|number`.

Changeset adds better support for these types.</pre>
</div>
</content>
</entry>
<entry>
<title>refactor(lua): improve type annotations</title>
<updated>2024-06-11T11:45:43+00:00</updated>
<author>
<name>Lewis Russell</name>
<email>lewis6991@gmail.com</email>
</author>
<published>2024-06-11T11:05:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=5e49ef0af3cb8dba658e5d0dc6a807f8edebf590'/>
<id>5e49ef0af3cb8dba658e5d0dc6a807f8edebf590</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix: lua annotations</title>
<updated>2024-04-26T14:13:06+00:00</updated>
<author>
<name>Lewis Russell</name>
<email>lewis6991@gmail.com</email>
</author>
<published>2024-04-26T13:07:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=b8273c9a339626078d49e706d882878090b07d42'/>
<id>b8273c9a339626078d49e706d882878090b07d42</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>docs: fix typos (#27868)</title>
<updated>2024-03-28T01:32:32+00:00</updated>
<author>
<name>dundargoc</name>
<email>33953936+dundargoc@users.noreply.github.com</email>
</author>
<published>2024-03-28T01:32:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=a89ce89742db600665b69e58d5e1bc3dbee9d57b'/>
<id>a89ce89742db600665b69e58d5e1bc3dbee9d57b</id>
<content type='text'>
Co-authored-by: ite-usagi &lt;77563904+ite-usagi@users.noreply.github.com&gt;
Co-authored-by: v-sim &lt;56476039+v-sim@users.noreply.github.com&gt;
Co-authored-by: Evgeni Chasnovski &lt;evgeni.chasnovski@gmail.com&gt;
Co-authored-by: zeertzjq &lt;zeertzjq@outlook.com&gt;
Co-authored-by: Quico Augustijn &lt;quico.public@gmail.com&gt;
Co-authored-by: nhld &lt;nahnera@gmail.com&gt;
Co-authored-by: francisco souza &lt;108725+fsouza@users.noreply.github.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Co-authored-by: ite-usagi &lt;77563904+ite-usagi@users.noreply.github.com&gt;
Co-authored-by: v-sim &lt;56476039+v-sim@users.noreply.github.com&gt;
Co-authored-by: Evgeni Chasnovski &lt;evgeni.chasnovski@gmail.com&gt;
Co-authored-by: zeertzjq &lt;zeertzjq@outlook.com&gt;
Co-authored-by: Quico Augustijn &lt;quico.public@gmail.com&gt;
Co-authored-by: nhld &lt;nahnera@gmail.com&gt;
Co-authored-by: francisco souza &lt;108725+fsouza@users.noreply.github.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>docs(editorconfig): move to source</title>
<updated>2024-03-10T23:20:44+00:00</updated>
<author>
<name>Lewis Russell</name>
<email>lewis6991@gmail.com</email>
</author>
<published>2024-03-09T12:21:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=a09ddd7ce55037edc9747a682810fba6a26bc201'/>
<id>a09ddd7ce55037edc9747a682810fba6a26bc201</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
