<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rneovim.git/runtime/lua/vim/treesitter.lua, branch userregs_2</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(treesitter): allow disabling captures and patterns on TSQuery (#32790)</title>
<updated>2025-03-11T13:45:01+00:00</updated>
<author>
<name>Ian Chamberlain</name>
<email>ian-h-chamberlain@users.noreply.github.com</email>
</author>
<published>2025-03-11T13:45:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=8b5a0a00c8cfe776c4227862c3fb32a07d154663'/>
<id>8b5a0a00c8cfe776c4227862c3fb32a07d154663</id>
<content type='text'>
Problem: Cannot disable individual captures and patterns in treesitter queries.

Solution: 
* Expose the corresponding tree-sitter API functions for `TSQuery` object. 
* Add documentation for `TSQuery`.
* Return the pattern ID from `get_captures_at_pos()` (and hence `:Inspect!`).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem: Cannot disable individual captures and patterns in treesitter queries.

Solution: 
* Expose the corresponding tree-sitter API functions for `TSQuery` object. 
* Add documentation for `TSQuery`.
* Return the pattern ID from `get_captures_at_pos()` (and hence `:Inspect!`).
</pre>
</div>
</content>
</entry>
<entry>
<title>doc: clarify window-id, tab-id, nvim_set_current_x #32528</title>
<updated>2025-02-27T10:05:00+00:00</updated>
<author>
<name>David Briscoe</name>
<email>43559+idbrii@users.noreply.github.com</email>
</author>
<published>2025-02-27T10:05:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=6a9555c0faf3fbfc8001244ae2a19da4e92babd7'/>
<id>6a9555c0faf3fbfc8001244ae2a19da4e92babd7</id>
<content type='text'>
Problem:
Descriptions are somewhat vague. nvim_set_current_line modifies contents
but nvim_set_current_buf does not, etc.

Solution:
- Make it clear that these functions accept or return a winid/tabid by
  linking to that concept in help.
- Only these few files use the term "handles", so replace them with the
  more conventional terminology.
- Add a new help section for tab-ID. This concept is unique to neovim
  because vim exposes tabnr, but not tab handles. This section is
  modelled after `:h winid`.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
Descriptions are somewhat vague. nvim_set_current_line modifies contents
but nvim_set_current_buf does not, etc.

Solution:
- Make it clear that these functions accept or return a winid/tabid by
  linking to that concept in help.
- Only these few files use the term "handles", so replace them with the
  more conventional terminology.
- Add a new help section for tab-ID. This concept is unique to neovim
  because vim exposes tabnr, but not tab handles. This section is
  modelled after `:h winid`.</pre>
</div>
</content>
</entry>
<entry>
<title>fix(treesitter)!: enforce buffer is loaded when creating parser</title>
<updated>2025-02-19T18:11:55+00:00</updated>
<author>
<name>Luuk van Baal</name>
<email>luukvbaal@gmail.com</email>
</author>
<published>2025-02-15T00:53:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=a0b52e7cb3d211e30c21464c4a4f4acecd6418c9'/>
<id>a0b52e7cb3d211e30c21464c4a4f4acecd6418c9</id>
<content type='text'>
Problem: `vim.treesitter._create_parser()` silently loads the buffer,
          bypassing the swapfile prompt.
Solution: Error for an unloaded buffer, ensure buffer is loaded in
          `vim.treesitter.start()` instead.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem: `vim.treesitter._create_parser()` silently loads the buffer,
          bypassing the swapfile prompt.
Solution: Error for an unloaded buffer, ensure buffer is loaded in
          `vim.treesitter.start()` instead.
</pre>
</div>
</content>
</entry>
<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>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): async parsing</title>
<updated>2025-01-12T16:10:47+00:00</updated>
<author>
<name>Riley Bruins</name>
<email>ribru17@hotmail.com</email>
</author>
<published>2024-12-18T18:48:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=45e606b1fddbfeee8fe28385b5371ca6f2fba71b'/>
<id>45e606b1fddbfeee8fe28385b5371ca6f2fba71b</id>
<content type='text'>
**Problem:** Parsing can be slow for large files, and it is a blocking
operation which can be disruptive and annoying.

**Solution:** Provide a function for asynchronous parsing, which accepts
a callback to be run after parsing completes.

Co-authored-by: Lewis Russell &lt;lewis6991@gmail.com&gt;
Co-authored-by: Luuk van Baal &lt;luukvbaal@gmail.com&gt;
Co-authored-by: VanaIgr &lt;vanaigranov@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
**Problem:** Parsing can be slow for large files, and it is a blocking
operation which can be disruptive and annoying.

**Solution:** Provide a function for asynchronous parsing, which accepts
a callback to be run after parsing completes.

Co-authored-by: Lewis Russell &lt;lewis6991@gmail.com&gt;
Co-authored-by: Luuk van Baal &lt;luukvbaal@gmail.com&gt;
Co-authored-by: VanaIgr &lt;vanaigranov@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>feat(treesitter): include capture id in return value of `get_captures_at_pos()` #30559</title>
<updated>2024-12-11T12:34:24+00:00</updated>
<author>
<name>Riley Bruins</name>
<email>ribru17@hotmail.com</email>
</author>
<published>2024-12-11T12:34:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=3dfb9e6f60d9ca27ff140a9300cc1a43e38aa2ee'/>
<id>3dfb9e6f60d9ca27ff140a9300cc1a43e38aa2ee</id>
<content type='text'>
**Problem:** Currently, it is difficult to get node(s)-level metadata
for a capture returned by `get_captures_at_pos()`. This is because it is
stored in `metadata[id]` and we do not have access to the value of `id`,
so to get this value we have to iterate over the keys of `metadata`. See
[this commit](https://github.com/neovim/neovim/commit/d63622930001b39b12f14112fc3abb55b760c447#diff-8bd4742121c2f359d0345f3c6c253a58220f1a28670cc4e1c957992232059a6cR16).

Things would be much simpler if we were given the `id` of the capture so
we could use it to just index `metadata` directly.

**Solution:** Include `id` in the data returned by
`get_captures_at_pos()`</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
**Problem:** Currently, it is difficult to get node(s)-level metadata
for a capture returned by `get_captures_at_pos()`. This is because it is
stored in `metadata[id]` and we do not have access to the value of `id`,
so to get this value we have to iterate over the keys of `metadata`. See
[this commit](https://github.com/neovim/neovim/commit/d63622930001b39b12f14112fc3abb55b760c447#diff-8bd4742121c2f359d0345f3c6c253a58220f1a28670cc4e1c957992232059a6cR16).

Things would be much simpler if we were given the `id` of the capture so
we could use it to just index `metadata` directly.

**Solution:** Include `id` in the data returned by
`get_captures_at_pos()`</pre>
</div>
</content>
</entry>
<entry>
<title>refactor: add vim._resolve_bufnr</title>
<updated>2024-12-07T16:58:40+00:00</updated>
<author>
<name>Lewis Russell</name>
<email>lewis6991@gmail.com</email>
</author>
<published>2024-12-07T13:05:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=668d2569b4109e7e83c45578c506c1c64dbd5e87'/>
<id>668d2569b4109e7e83c45578c506c1c64dbd5e87</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix: another round of type annotation fixes</title>
<updated>2024-10-31T11:55:23+00:00</updated>
<author>
<name>Lewis Russell</name>
<email>lewis6991@gmail.com</email>
</author>
<published>2024-10-31T11:28:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=1d4ba8c1edba064421b34c1197c3470a09798218'/>
<id>1d4ba8c1edba064421b34c1197c3470a09798218</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<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>
</feed>
