<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rneovim.git/runtime/lua/vim/treesitter/highlighter.lua, branch fix_repeatcmdline</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>perf(treesitter): do not scan past given line for predicate match</title>
<updated>2023-09-16T12:52:42+00:00</updated>
<author>
<name>L Lllvvuu</name>
<email>git@llllvvuu.dev</email>
</author>
<published>2023-09-16T09:48:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=07080f67fe7e526576d5d50777fb122a99b3e183'/>
<id>07080f67fe7e526576d5d50777fb122a99b3e183</id>
<content type='text'>
Problem
---
If a highlighter query returns a significant number of predicate
non-matches, the highlighter will scan well past the end of the window.

Solution
---
In the iterator returned from `iter_captures`, accept an optional
parameter `end_line`. If no parameter provided, the behavior is
unchanged, hence this is a non-invasive tweak.

Fixes: #25113 nvim-treesitter/nvim-treesitter#5057
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem
---
If a highlighter query returns a significant number of predicate
non-matches, the highlighter will scan well past the end of the window.

Solution
---
In the iterator returned from `iter_captures`, accept an optional
parameter `end_line`. If no parameter provided, the behavior is
unchanged, hence this is a non-invasive tweak.

Fixes: #25113 nvim-treesitter/nvim-treesitter#5057
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(decorations): better approximation of botline #24794</title>
<updated>2023-09-11T19:29:39+00:00</updated>
<author>
<name>Jaehwang Jung</name>
<email>tomtomjhj@gmail.com</email>
</author>
<published>2023-09-11T19:29:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=65738202f8be3ca63b75197d48f2c7a9324c035b'/>
<id>65738202f8be3ca63b75197d48f2c7a9324c035b</id>
<content type='text'>
Problem:
* The guessed botline might be smaller than the actual botline e.g. when
  there are folds and the user is typing in insert mode. This may result
  in incorrect treesitter highlights for injections.
* botline can be larger than the last line number of the buffer, which
  results in errors when placing extmarks.

Solution:
* Take a more conservative approximation. I am not sure if it is
  sufficient to guarantee correctness, but it seems to be good enough
  for the case mentioned above.
* Clamp it to the last line number.

Co-authored-by: Lewis Russell &lt;me@lewisr.dev&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
* The guessed botline might be smaller than the actual botline e.g. when
  there are folds and the user is typing in insert mode. This may result
  in incorrect treesitter highlights for injections.
* botline can be larger than the last line number of the buffer, which
  results in errors when placing extmarks.

Solution:
* Take a more conservative approximation. I am not sure if it is
  sufficient to guarantee correctness, but it seems to be good enough
  for the case mentioned above.
* Clamp it to the last line number.

Co-authored-by: Lewis Russell &lt;me@lewisr.dev&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>feat(treesitter)!: incremental injection parsing</title>
<updated>2023-08-12T15:11:36+00:00</updated>
<author>
<name>Lewis Russell</name>
<email>lewis6991@gmail.com</email>
</author>
<published>2023-08-10T13:21:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=2ca076e45fb3f1c08f6a1a374834df0701b8d778'/>
<id>2ca076e45fb3f1c08f6a1a374834df0701b8d778</id>
<content type='text'>
Problem:

Treesitter highlighting is slow for large files with lots of injections.

Solution:

Only parse injections we are going to render during a redraw cycle.

---

- `LanguageTree:parse()` will no longer parse injections by default and
  now requires an explicit range argument to be passed.

- `TSHighlighter` now parses injections incrementally during on_win
  callbacks for the line range being rendered.

- Plugins which require certain injections to be parsed must run
  `parser:parse({ start_row, end_row })` before using the tree.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:

Treesitter highlighting is slow for large files with lots of injections.

Solution:

Only parse injections we are going to render during a redraw cycle.

---

- `LanguageTree:parse()` will no longer parse injections by default and
  now requires an explicit range argument to be passed.

- `TSHighlighter` now parses injections incrementally during on_win
  callbacks for the line range being rendered.

- Plugins which require certain injections to be parsed must run
  `parser:parse({ start_row, end_row })` before using the tree.
</pre>
</div>
</content>
</entry>
<entry>
<title>docs(lua): more improvements (#24387)</title>
<updated>2023-07-18T14:42:30+00:00</updated>
<author>
<name>Lewis Russell</name>
<email>lewis6991@gmail.com</email>
</author>
<published>2023-07-18T14:42:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=be74807eef13ff8c90d55cf8b22b01d6d33b1641'/>
<id>be74807eef13ff8c90d55cf8b22b01d6d33b1641</id>
<content type='text'>
* docs(lua): teach lua2dox how to table

* docs(lua): teach gen_vimdoc.py about local functions

No more need to mark local functions with @private

* docs(lua): mention @nodoc and @meta in dev-lua-doc

* fixup!

Co-authored-by: Justin M. Keyes &lt;justinkz@gmail.com&gt;

---------

Co-authored-by: Justin M. Keyes &lt;justinkz@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* docs(lua): teach lua2dox how to table

* docs(lua): teach gen_vimdoc.py about local functions

No more need to mark local functions with @private

* docs(lua): mention @nodoc and @meta in dev-lua-doc

* fixup!

Co-authored-by: Justin M. Keyes &lt;justinkz@gmail.com&gt;

---------

Co-authored-by: Justin M. Keyes &lt;justinkz@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>fix(treesitter): use vim.highlight.priorities instead of hardcoded 100 (#24052)</title>
<updated>2023-06-18T14:42:17+00:00</updated>
<author>
<name>Santos Gallegos</name>
<email>stsewd@proton.me</email>
</author>
<published>2023-06-18T14:42:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=8c9dab3e0d788d44c8a2fee83a6193f5955c814e'/>
<id>8c9dab3e0d788d44c8a2fee83a6193f5955c814e</id>
<content type='text'>
Problem: Treesitter highlighting base priority cannot be customized.

Solution: Use `vim.highlight.priorities.treesitter` instead of hard-coded value.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem: Treesitter highlighting base priority cannot be customized.

Solution: Use `vim.highlight.priorities.treesitter` instead of hard-coded value.</pre>
</div>
</content>
</entry>
<entry>
<title>fix(treesitter): redraw added/removed injections properly (#23287)</title>
<updated>2023-04-30T15:11:38+00:00</updated>
<author>
<name>Lewis Russell</name>
<email>lewis6991@gmail.com</email>
</author>
<published>2023-04-30T15:11:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=19a793545f15bb7e0bac2fc8f705c600e8f9c9bb'/>
<id>19a793545f15bb7e0bac2fc8f705c600e8f9c9bb</id>
<content type='text'>
When injections are added or removed make sure to:
- invoke 'changedtree' callbacks for when new trees are added.
- invoke 'changedtree' callbacks for when trees are invalidated
- redraw regions when languagetree children are removed</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When injections are added or removed make sure to:
- invoke 'changedtree' callbacks for when new trees are added.
- invoke 'changedtree' callbacks for when trees are invalidated
- redraw regions when languagetree children are removed</pre>
</div>
</content>
</entry>
<entry>
<title>refactor: rename local API alias from a to api</title>
<updated>2023-04-05T16:19:53+00:00</updated>
<author>
<name>Lewis Russell</name>
<email>lewis6991@gmail.com</email>
</author>
<published>2023-04-05T16:19:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=34ac75b32927328a0c691c5bda987c0fdb5ce9eb'/>
<id>34ac75b32927328a0c691c5bda987c0fdb5ce9eb</id>
<content type='text'>
Problem:
  Codebase inconsistently binds vim.api onto a or api.

Solution:
  Use api everywhere. a as an identifier is too short to have at the
  module level.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
  Codebase inconsistently binds vim.api onto a or api.

Solution:
  Use api everywhere. a as an identifier is too short to have at the
  module level.</pre>
</div>
</content>
</entry>
<entry>
<title>fix(treesitter): use capture metadata range if exists </title>
<updated>2023-04-04T11:26:21+00:00</updated>
<author>
<name>danilax999</name>
<email>75566563+danilax999@users.noreply.github.com</email>
</author>
<published>2023-04-04T11:26:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=469e6bfc56aa18350bfab13bef8a51b02a5b3c65'/>
<id>469e6bfc56aa18350bfab13bef8a51b02a5b3c65</id>
<content type='text'>
use `treesitter.get_range` instead of inline expression</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
use `treesitter.get_range` instead of inline expression</pre>
</div>
</content>
</entry>
<entry>
<title>feat(treesitter)!: deprecate top level indexes to modules (#22761)</title>
<updated>2023-03-24T14:43:14+00:00</updated>
<author>
<name>Lewis Russell</name>
<email>lewis6991@gmail.com</email>
</author>
<published>2023-03-24T14:43:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=cbbf8bd666c8419fdab80a0887948c8a36279c19'/>
<id>cbbf8bd666c8419fdab80a0887948c8a36279c19</id>
<content type='text'>
The following top level Treesitter functions have been moved:
  - vim.treesitter.inspect_language() -&gt; vim.treesitter.language.inspect()
  - vim.treesitter.get_query_files() -&gt; vim.treesitter.query.get_files()
  - vim.treesitter.set_query() -&gt; vim.treesitter.query.set()
  - vim.treesitter.query.set_query() -&gt; vim.treesitter.query.set()
  - vim.treesitter.get_query() -&gt; vim.treesitter.query.get()
  - vim.treesitter.query.get_query() -&gt; vim.treesitter.query.get()
  - vim.treesitter.parse_query() -&gt; vim.treesitter.query.parse()
  - vim.treesitter.query.parse_query() -&gt; vim.treesitter.query.parse()
  - vim.treesitter.add_predicate() -&gt; vim.treesitter.query.add_predicate()
  - vim.treesitter.add_directive() -&gt; vim.treesitter.query.add_directive()
  - vim.treesitter.list_predicates() -&gt; vim.treesitter.query.list_predicates()
  - vim.treesitter.list_directives() -&gt; vim.treesitter.query.list_directives()
  - vim.treesitter.query.get_range() -&gt; vim.treesitter.get_range()
  - vim.treesitter.query.get_node_text() -&gt; vim.treesitter.get_node_text()</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The following top level Treesitter functions have been moved:
  - vim.treesitter.inspect_language() -&gt; vim.treesitter.language.inspect()
  - vim.treesitter.get_query_files() -&gt; vim.treesitter.query.get_files()
  - vim.treesitter.set_query() -&gt; vim.treesitter.query.set()
  - vim.treesitter.query.set_query() -&gt; vim.treesitter.query.set()
  - vim.treesitter.get_query() -&gt; vim.treesitter.query.get()
  - vim.treesitter.query.get_query() -&gt; vim.treesitter.query.get()
  - vim.treesitter.parse_query() -&gt; vim.treesitter.query.parse()
  - vim.treesitter.query.parse_query() -&gt; vim.treesitter.query.parse()
  - vim.treesitter.add_predicate() -&gt; vim.treesitter.query.add_predicate()
  - vim.treesitter.add_directive() -&gt; vim.treesitter.query.add_directive()
  - vim.treesitter.list_predicates() -&gt; vim.treesitter.query.list_predicates()
  - vim.treesitter.list_directives() -&gt; vim.treesitter.query.list_directives()
  - vim.treesitter.query.get_range() -&gt; vim.treesitter.get_range()
  - vim.treesitter.query.get_node_text() -&gt; vim.treesitter.get_node_text()</pre>
</div>
</content>
</entry>
<entry>
<title>fix(treesitter): annotations</title>
<updated>2023-03-23T11:23:51+00:00</updated>
<author>
<name>Lewis Russell</name>
<email>lewis6991@gmail.com</email>
</author>
<published>2023-03-23T11:23:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=4e4203f71b0b9bb2ca4ad9abd2fbf4ea1deaf9a6'/>
<id>4e4203f71b0b9bb2ca4ad9abd2fbf4ea1deaf9a6</id>
<content type='text'>
- Begin using `@package` in place of `@private` for functions
that are accessed internally but outside their defined class.

- Rename Node -&gt; TSP.Node</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Begin using `@package` in place of `@private` for functions
that are accessed internally but outside their defined class.

- Rename Node -&gt; TSP.Node</pre>
</div>
</content>
</entry>
</feed>
