<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rneovim.git/runtime/lua/vim/keymap.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(vim.validate): improve fast form and deprecate spec form</title>
<updated>2024-10-21T10:32:06+00:00</updated>
<author>
<name>Lewis Russell</name>
<email>lewis6991@gmail.com</email>
</author>
<published>2024-10-18T10:33:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=3572319b4cb1a4163624a5fe328886f1928dbc4a'/>
<id>3572319b4cb1a4163624a5fe328886f1928dbc4a</id>
<content type='text'>
Problem:

`vim.validate()` takes two forms when it only needs one.

Solution:

- Teach the fast form all the features of the spec form.
- Deprecate the spec form.
- General optimizations for both forms.
- Add a `message` argument which can be used alongside or in place
  of the `optional` argument.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:

`vim.validate()` takes two forms when it only needs one.

Solution:

- Teach the fast form all the features of the spec form.
- Deprecate the spec form.
- General optimizations for both forms.
- Add a `message` argument which can be used alongside or in place
  of the `optional` argument.
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor(lua): vim.keymap.set tests, docs #30511</title>
<updated>2024-09-25T14:01:27+00:00</updated>
<author>
<name>Justin M. Keyes</name>
<email>justinkz@gmail.com</email>
</author>
<published>2024-09-25T14:01:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=f3b7444e6638095305d86fa96fe0b7407c9b1648'/>
<id>f3b7444e6638095305d86fa96fe0b7407c9b1648</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor(lua): type annotations</title>
<updated>2024-03-16T19:26:10+00:00</updated>
<author>
<name>Lewis Russell</name>
<email>lewis6991@gmail.com</email>
</author>
<published>2024-03-16T17:11:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=14e4b6bbd8640675d7393bdeb3e93d74ab875ff1'/>
<id>14e4b6bbd8640675d7393bdeb3e93d74ab875ff1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>feat(docs): replace lua2dox.lua</title>
<updated>2024-02-27T14:41:17+00:00</updated>
<author>
<name>Lewis Russell</name>
<email>lewis6991@gmail.com</email>
</author>
<published>2024-02-15T17:16:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=9beb40a4db5613601fc1a4b828a44e5977eca046'/>
<id>9beb40a4db5613601fc1a4b828a44e5977eca046</id>
<content type='text'>
Problem:

The documentation flow (`gen_vimdoc.py`) has several issues:
- it's not very versatile
- depends on doxygen
- doesn't work well with Lua code as it requires an awkward filter script to convert it into pseudo-C.
- The intermediate XML files and filters makes it too much like a rube goldberg machine.

Solution:

Re-implement the flow using Lua, LPEG and treesitter.

- `gen_vimdoc.py` is now replaced with `gen_vimdoc.lua` and replicates a portion of the logic.
- `lua2dox.lua` is gone!
- No more XML files.
- Doxygen is now longer used and instead we now use:
  - LPEG for comment parsing (see `scripts/luacats_grammar.lua` and `scripts/cdoc_grammar.lua`).
  - LPEG for C parsing (see `scripts/cdoc_parser.lua`)
  - Lua patterns for Lua parsing (see `scripts/luacats_parser.lua`).
  - Treesitter for Markdown parsing (see `scripts/text_utils.lua`).
- The generated `runtime/doc/*.mpack` files have been removed.
   - `scripts/gen_eval_files.lua` now instead uses `scripts/cdoc_parser.lua` directly.
- Text wrapping is implemented in `scripts/text_utils.lua` and appears to produce more consistent results (the main contributer to the diff of this change).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:

The documentation flow (`gen_vimdoc.py`) has several issues:
- it's not very versatile
- depends on doxygen
- doesn't work well with Lua code as it requires an awkward filter script to convert it into pseudo-C.
- The intermediate XML files and filters makes it too much like a rube goldberg machine.

Solution:

Re-implement the flow using Lua, LPEG and treesitter.

- `gen_vimdoc.py` is now replaced with `gen_vimdoc.lua` and replicates a portion of the logic.
- `lua2dox.lua` is gone!
- No more XML files.
- Doxygen is now longer used and instead we now use:
  - LPEG for comment parsing (see `scripts/luacats_grammar.lua` and `scripts/cdoc_grammar.lua`).
  - LPEG for C parsing (see `scripts/cdoc_parser.lua`)
  - Lua patterns for Lua parsing (see `scripts/luacats_parser.lua`).
  - Treesitter for Markdown parsing (see `scripts/text_utils.lua`).
- The generated `runtime/doc/*.mpack` files have been removed.
   - `scripts/gen_eval_files.lua` now instead uses `scripts/cdoc_parser.lua` directly.
- Text wrapping is implemented in `scripts/text_utils.lua` and appears to produce more consistent results (the main contributer to the diff of this change).
</pre>
</div>
</content>
</entry>
<entry>
<title>feat(lua): add noref to deepcopy</title>
<updated>2024-01-03T19:17:52+00:00</updated>
<author>
<name>Lewis Russell</name>
<email>lewis6991@gmail.com</email>
</author>
<published>2024-01-02T15:47:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=3734519e3b4ba1bf19ca772104170b0ef776be46'/>
<id>3734519e3b4ba1bf19ca772104170b0ef776be46</id>
<content type='text'>
Problem:

Currently `deepcopy` hashes every single tables it copies so it can be
reused. For tables of mostly unique items that are non recursive, this
hashing is unnecessarily expensive

Solution:

Port the `noref` argument from Vimscripts `deepcopy()`.

The below benchmark demonstrates the results for two extreme cases of
tables of different sizes. One table that uses the same table lots of
times and one with all unique tables.

| test                 | `noref=false` (ms) | `noref=true` (ms) |
| -------------------- | ------------------ | ----------------- |
| unique tables (50)   | 6.59               | 2.62              |
| shared tables (50)   | 3.24               | 6.40              |
| unique tables (2000) | 23381.48           | 2884.53           |
| shared tables (2000) | 3505.54            | 14038.80          |

The results are basically the inverse of each other where `noref` is
much more performance on tables with unique fields, and `not noref` is
more performant on tables that reuse fields.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:

Currently `deepcopy` hashes every single tables it copies so it can be
reused. For tables of mostly unique items that are non recursive, this
hashing is unnecessarily expensive

Solution:

Port the `noref` argument from Vimscripts `deepcopy()`.

The below benchmark demonstrates the results for two extreme cases of
tables of different sizes. One table that uses the same table lots of
times and one with all unique tables.

| test                 | `noref=false` (ms) | `noref=true` (ms) |
| -------------------- | ------------------ | ----------------- |
| unique tables (50)   | 6.59               | 2.62              |
| shared tables (50)   | 3.24               | 6.40              |
| unique tables (2000) | 23381.48           | 2884.53           |
| shared tables (2000) | 3505.54            | 14038.80          |

The results are basically the inverse of each other where `noref` is
much more performance on tables with unique fields, and `not noref` is
more performant on tables that reuse fields.
</pre>
</div>
</content>
</entry>
<entry>
<title>docs: fix type warnings</title>
<updated>2023-09-23T22:46:45+00:00</updated>
<author>
<name>Maria José Solano</name>
<email>majosolano99@gmail.com</email>
</author>
<published>2023-09-21T02:03:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=bc0bf9d030bbcb01db69c44cf88b95ca41dd3065'/>
<id>bc0bf9d030bbcb01db69c44cf88b95ca41dd3065</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>docs: replace &lt;pre&gt; with ``` (#25136)</title>
<updated>2023-09-14T13:23:01+00:00</updated>
<author>
<name>Gregory Anders</name>
<email>8965202+gpanders@users.noreply.github.com</email>
</author>
<published>2023-09-14T13:23:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=2e92065686f62851318150a315591c30b8306a4b'/>
<id>2e92065686f62851318150a315591c30b8306a4b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>docs(lua): adds links to related keymap functions to keymap.set (#24337)</title>
<updated>2023-07-13T12:43:36+00:00</updated>
<author>
<name>Mathias Fußenegger</name>
<email>mfussenegger@users.noreply.github.com</email>
</author>
<published>2023-07-13T12:43:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=a3f4598226c4d01e4fbc41181a1ad21793862fe3'/>
<id>a3f4598226c4d01e4fbc41181a1ad21793862fe3</id>
<content type='text'>
Might help with discovery, given that there is no `keymap.get()`</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Might help with discovery, given that there is no `keymap.get()`</pre>
</div>
</content>
</entry>
<entry>
<title>docs: various clarifications (#23999)</title>
<updated>2023-06-12T12:08:08+00:00</updated>
<author>
<name>zeertzjq</name>
<email>zeertzjq@outlook.com</email>
</author>
<published>2023-06-12T12:08:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=0eb02ea90a5a7c2e35bfcf99b701a28ff2901b4b'/>
<id>0eb02ea90a5a7c2e35bfcf99b701a28ff2901b4b</id>
<content type='text'>
Close #18907
Close #20314
Close #23749</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Close #18907
Close #20314
Close #23749</pre>
</div>
</content>
</entry>
<entry>
<title>docs: fix typos (#23917)</title>
<updated>2023-06-10T01:37:05+00:00</updated>
<author>
<name>Jonas Strittmatter</name>
<email>40792180+smjonas@users.noreply.github.com</email>
</author>
<published>2023-06-10T01:37:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=7154f0c98619d0789618f370a6c7f81ee1775469'/>
<id>7154f0c98619d0789618f370a6c7f81ee1775469</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
