<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rneovim.git/runtime/lua/vim/_editor.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>fix: resolve all remaining LuaLS diagnostics</title>
<updated>2025-01-27T16:37:50+00:00</updated>
<author>
<name>Lewis Russell</name>
<email>lewis6991@gmail.com</email>
</author>
<published>2025-01-24T13:01:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=6aa42e8f92bd8bea49b7b2accfe4ab67a5344e41'/>
<id>6aa42e8f92bd8bea49b7b2accfe4ab67a5344e41</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>docs: misc</title>
<updated>2025-01-11T09:34:12+00:00</updated>
<author>
<name>dundargoc</name>
<email>gocdundar@gmail.com</email>
</author>
<published>2024-11-24T10:29:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=6a425e7045cca609d95612c0f2cd08d0265238a9'/>
<id>6a425e7045cca609d95612c0f2cd08d0265238a9</id>
<content type='text'>
Co-authored-by: Axel &lt;axelhjq@gmail.com&gt;
Co-authored-by: Colin Kennedy &lt;colinvfx@gmail.com&gt;
Co-authored-by: Daiki Noda &lt;sys9kdr@users.noreply.github.com&gt;
Co-authored-by: Evgeni Chasnovski &lt;evgeni.chasnovski@gmail.com&gt;
Co-authored-by: Jean-Jacq du Plessis &lt;1030058+jj-du-plessis@users.noreply.github.com&gt;
Co-authored-by: Juan Giordana &lt;juangiordana@gmail.com&gt;
Co-authored-by: Lincoln Wallace &lt;locnnil0@gmail.com&gt;
Co-authored-by: Matti Hellström &lt;hellstrom@scm.com&gt;
Co-authored-by: Steven Locorotondo &lt;steven.locorotondo@justeattakeaway.com&gt;
Co-authored-by: Yochem van Rosmalen &lt;git@yochem.nl&gt;
Co-authored-by: glepnir &lt;glephunter@gmail.com&gt;
Co-authored-by: ifish &lt;fishioon@live.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Co-authored-by: Axel &lt;axelhjq@gmail.com&gt;
Co-authored-by: Colin Kennedy &lt;colinvfx@gmail.com&gt;
Co-authored-by: Daiki Noda &lt;sys9kdr@users.noreply.github.com&gt;
Co-authored-by: Evgeni Chasnovski &lt;evgeni.chasnovski@gmail.com&gt;
Co-authored-by: Jean-Jacq du Plessis &lt;1030058+jj-du-plessis@users.noreply.github.com&gt;
Co-authored-by: Juan Giordana &lt;juangiordana@gmail.com&gt;
Co-authored-by: Lincoln Wallace &lt;locnnil0@gmail.com&gt;
Co-authored-by: Matti Hellström &lt;hellstrom@scm.com&gt;
Co-authored-by: Steven Locorotondo &lt;steven.locorotondo@justeattakeaway.com&gt;
Co-authored-by: Yochem van Rosmalen &lt;git@yochem.nl&gt;
Co-authored-by: glepnir &lt;glephunter@gmail.com&gt;
Co-authored-by: ifish &lt;fishioon@live.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>docs: misc #31867</title>
<updated>2025-01-09T17:26:45+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2025-01-09T17:26:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=7c00e0efbb18e8627ac59eaadf564a9f1b2bafcd'/>
<id>7c00e0efbb18e8627ac59eaadf564a9f1b2bafcd</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>feat(api): deprecate nvim_out/err_write(ln)</title>
<updated>2025-01-09T12:35:42+00:00</updated>
<author>
<name>Luuk van Baal</name>
<email>luukvbaal@gmail.com</email>
</author>
<published>2025-01-07T15:38:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=5c92b40b4b173c7d85106689fef811e41994abb0'/>
<id>5c92b40b4b173c7d85106689fef811e41994abb0</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(messages): proper multiline Lua print() messages #31205</title>
<updated>2024-11-17T18:21:50+00:00</updated>
<author>
<name>luukvbaal</name>
<email>luukvbaal@gmail.com</email>
</author>
<published>2024-11-17T18:21:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=e025f5a5b30a1ef92e88fed0f0c548d2240d30c0'/>
<id>e025f5a5b30a1ef92e88fed0f0c548d2240d30c0</id>
<content type='text'>
Problem:  Separate message emitted for each newline present in Lua
          print() arguments.
Solution: Make msg_multiline() handle NUL bytes. Refactor print() to use
          msg_multiline(). Refactor vim.print() to use print().</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:  Separate message emitted for each newline present in Lua
          print() arguments.
Solution: Make msg_multiline() handle NUL bytes. Refactor print() to use
          msg_multiline(). Refactor vim.print() to use print().</pre>
</div>
</content>
</entry>
<entry>
<title>perf(lsp): use faster version of str_byteindex</title>
<updated>2024-11-11T14:23:38+00:00</updated>
<author>
<name>Lewis Russell</name>
<email>lewis6991@gmail.com</email>
</author>
<published>2024-11-11T14:23:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=3e855d533f4477ffddfe94ccea48255979c8b7fb'/>
<id>3e855d533f4477ffddfe94ccea48255979c8b7fb</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): show stacktrace for error in vim.on_key() callback (#31021)</title>
<updated>2024-11-02T02:11:06+00:00</updated>
<author>
<name>zeertzjq</name>
<email>zeertzjq@outlook.com</email>
</author>
<published>2024-11-02T02:11:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=3688a333544251c887d78e6501eec55f0fb685f8'/>
<id>3688a333544251c887d78e6501eec55f0fb685f8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>feat(lua): allow vim.on_key() callback to consume the key (#30939)</title>
<updated>2024-11-01T01:11:15+00:00</updated>
<author>
<name>errael</name>
<email>errael@raelity.com</email>
</author>
<published>2024-11-01T01:11:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=b34e137e43d359c8db4fb76028dea3b410842aff'/>
<id>b34e137e43d359c8db4fb76028dea3b410842aff</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor(lsp): drop str_byteindex/str_utfindex wrappers #30915</title>
<updated>2024-10-26T14:38:25+00:00</updated>
<author>
<name>Tristan Knight</name>
<email>admin@snappeh.com</email>
</author>
<published>2024-10-26T14:38:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=25b53b593ef6f229fbec5b3dc205a7539579d13a'/>
<id>25b53b593ef6f229fbec5b3dc205a7539579d13a</id>
<content type='text'>
* deprecate old signatures
* move to new str_byteindex/str_utfindex signature
* use single-underscore name (double-underscore is reserved for Lua itself)</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* deprecate old signatures
* move to new str_byteindex/str_utfindex signature
* use single-underscore name (double-underscore is reserved for Lua itself)</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>
</feed>
