<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rneovim.git/test/functional/treesitter/node_spec.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>build(deps)!: bump tree-sitter to HEAD, wasmtime to v29.0.1 (#32200)</title>
<updated>2025-01-27T15:16:06+00:00</updated>
<author>
<name>Christian Clason</name>
<email>c.clason@uni-graz.at</email>
</author>
<published>2025-01-27T15:16:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=eb60cd74fb5caa997e6253bef6a1f0b58e1b6ec6'/>
<id>eb60cd74fb5caa997e6253bef6a1f0b58e1b6ec6</id>
<content type='text'>
Breaking change: `ts_node_child_containing_descendant()` was removed

Breaking change: tree-sitter 0.25 (HEAD) required</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Breaking change: `ts_node_child_containing_descendant()` was removed

Breaking change: tree-sitter 0.25 (HEAD) required</pre>
</div>
</content>
</entry>
<entry>
<title>feat(treesitter)!: don't parse tree in get_parser() or start()</title>
<updated>2025-01-12T16:10:49+00:00</updated>
<author>
<name>Riley Bruins</name>
<email>ribru17@hotmail.com</email>
</author>
<published>2024-12-21T00:23:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=bd4ca22d0334a3323313dfd6975a80218ec65e36'/>
<id>bd4ca22d0334a3323313dfd6975a80218ec65e36</id>
<content type='text'>
**Problem:** `vim.treesitter.get_parser()` and `vim.treesitter.start()`
both parse the tree before returning it. This is problematic because if
this is a sync parse, it will stall the editor on large files. If it is
an async parse, the functions return stale trees.

**Solution:** Remove this parsing side effect and leave it to the user
to parse the returned trees, either synchronously or asynchronously.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
**Problem:** `vim.treesitter.get_parser()` and `vim.treesitter.start()`
both parse the tree before returning it. This is problematic because if
this is a sync parse, it will stall the editor on large files. If it is
an async parse, the functions return stale trees.

**Solution:** Remove this parsing side effect and leave it to the user
to parse the returned trees, either synchronously or asynchronously.
</pre>
</div>
</content>
</entry>
<entry>
<title>feat(treesitter): introduce child_with_descendant()</title>
<updated>2024-10-11T15:29:45+00:00</updated>
<author>
<name>Riley Bruins</name>
<email>ribru17@hotmail.com</email>
</author>
<published>2024-10-02T17:34:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=267c7525f738cdd6024c39da758e885c026ffaaa'/>
<id>267c7525f738cdd6024c39da758e885c026ffaaa</id>
<content type='text'>
This commit also marks `child_containing_descendant()` as deprecated
(per upstream's documentation), and uses `child_with_descendant()` in
its place. Minimum required tree-sitter version will now be `0.24`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit also marks `child_containing_descendant()` as deprecated
(per upstream's documentation), and uses `child_with_descendant()` in
its place. Minimum required tree-sitter version will now be `0.24`.
</pre>
</div>
</content>
</entry>
<entry>
<title>test: support upvalues in exec_lua</title>
<updated>2024-09-21T15:04:09+00:00</updated>
<author>
<name>Lewis Russell</name>
<email>lewis6991@gmail.com</email>
</author>
<published>2024-08-11T08:27:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=e5c174421df3872df0dd3a676609d1e74dfef6a9'/>
<id>e5c174421df3872df0dd3a676609d1e74dfef6a9</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>test: allow exec_lua to handle functions</title>
<updated>2024-08-02T18:04:37+00:00</updated>
<author>
<name>Lewis Russell</name>
<email>lewis6991@gmail.com</email>
</author>
<published>2024-07-29T10:20:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=7d24c4d6b0413cd5af8d0579f0a9a694db7f775e'/>
<id>7d24c4d6b0413cd5af8d0579f0a9a694db7f775e</id>
<content type='text'>
Problem:

Tests have lots of exec_lua calls which input blocks of code
provided as unformatted strings.

Solution:

Teach exec_lua how to handle functions.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:

Tests have lots of exec_lua calls which input blocks of code
provided as unformatted strings.

Solution:

Teach exec_lua how to handle functions.
</pre>
</div>
</content>
</entry>
<entry>
<title>feat(treesitter): allow get_node to return anonymous nodes</title>
<updated>2024-07-29T15:15:46+00:00</updated>
<author>
<name>Riley Bruins</name>
<email>ribru17@hotmail.com</email>
</author>
<published>2024-07-28T20:30:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=1af55bfcf21b9bc7594b9c5ee0c2f60cbb887654'/>
<id>1af55bfcf21b9bc7594b9c5ee0c2f60cbb887654</id>
<content type='text'>
Adds a new field `include_anonymous` to the `get_node` options to allow
anonymous nodes to be returned.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Adds a new field `include_anonymous` to the `get_node` options to allow
anonymous nodes to be returned.
</pre>
</div>
</content>
</entry>
<entry>
<title>perf(treesitter): use child_containing_descendant() in has-ancestor? (#28512)</title>
<updated>2024-05-16T14:57:58+00:00</updated>
<author>
<name>vanaigr</name>
<email>vanaigranov@gmail.com</email>
</author>
<published>2024-05-16T14:57:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=4b029163345333a2c6975cd0dace6613b036ae47'/>
<id>4b029163345333a2c6975cd0dace6613b036ae47</id>
<content type='text'>
Problem: `has-ancestor?` is O(n²) for the depth of the tree since it iterates over each of the node's ancestors (bottom-up), and each ancestor takes O(n) time.
This happens because tree-sitter's nodes don't store their parent nodes, and the tree is searched (top-down) each time a new parent is requested.

Solution: Make use of new `ts_node_child_containing_descendant()` in tree-sitter v0.22.6 (which is now the minimum required version) to rewrite the `has-ancestor?` predicate in C to become O(n).

For a sample file, decreases the time taken by `has-ancestor?` from 360ms to 6ms.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem: `has-ancestor?` is O(n²) for the depth of the tree since it iterates over each of the node's ancestors (bottom-up), and each ancestor takes O(n) time.
This happens because tree-sitter's nodes don't store their parent nodes, and the tree is searched (top-down) each time a new parent is requested.

Solution: Make use of new `ts_node_child_containing_descendant()` in tree-sitter v0.22.6 (which is now the minimum required version) to rewrite the `has-ancestor?` predicate in C to become O(n).

For a sample file, decreases the time taken by `has-ancestor?` from 360ms to 6ms.
</pre>
</div>
</content>
</entry>
<entry>
<title>test: improve test conventions</title>
<updated>2024-04-23T16:17:04+00:00</updated>
<author>
<name>dundargoc</name>
<email>gocdundar@gmail.com</email>
</author>
<published>2024-04-20T15:44:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=052498ed42780a76daea589d063cd8947a894673'/>
<id>052498ed42780a76daea589d063cd8947a894673</id>
<content type='text'>
Specifically, functions that are run in the context of the test runner
are put in module `test/testutil.lua` while the functions that are run
in the context of the test session are put in
`test/functional/testnvim.lua`.

Closes https://github.com/neovim/neovim/issues/27004.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Specifically, functions that are run in the context of the test runner
are put in module `test/testutil.lua` while the functions that are run
in the context of the test session are put in
`test/functional/testnvim.lua`.

Closes https://github.com/neovim/neovim/issues/27004.
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor(test): inject after_each differently</title>
<updated>2024-04-10T14:53:50+00:00</updated>
<author>
<name>Lewis Russell</name>
<email>lewis6991@gmail.com</email>
</author>
<published>2024-04-09T11:26:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=81fc27124b9e1b375e0ce9605ae69c3c2a2d9222'/>
<id>81fc27124b9e1b375e0ce9605ae69c3c2a2d9222</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>test: improve test conventions</title>
<updated>2024-04-08T20:51:00+00:00</updated>
<author>
<name>dundargoc</name>
<email>gocdundar@gmail.com</email>
</author>
<published>2024-04-08T09:03:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=7035125b2b26aa68fcfb7cda39377ac79926a0f9'/>
<id>7035125b2b26aa68fcfb7cda39377ac79926a0f9</id>
<content type='text'>
Work on https://github.com/neovim/neovim/issues/27004.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Work on https://github.com/neovim/neovim/issues/27004.
</pre>
</div>
</content>
</entry>
</feed>
