<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rneovim.git/runtime/lua/vim/treesitter/language.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): add more metadata to `language.inspect()` (#32657)</title>
<updated>2025-03-01T15:51:09+00:00</updated>
<author>
<name>Lewis Russell</name>
<email>lewis6991@gmail.com</email>
</author>
<published>2025-03-01T15:51:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=ec8922978eb14fe62671628bb25215743712eac0'/>
<id>ec8922978eb14fe62671628bb25215743712eac0</id>
<content type='text'>
Problem: No way to check the version of a treesitter parser.

Solution: Add version metadata (ABI 15 parsers only) as well as parser state count and supertype information (ABI 15) in `vim.treesitter.language.inspect()`. Also graduate the `abi_version` field, as this is now the official upstream name.

---------

Co-authored-by: Christian Clason &lt;c.clason@uni-graz.at&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem: No way to check the version of a treesitter parser.

Solution: Add version metadata (ABI 15 parsers only) as well as parser state count and supertype information (ABI 15) in `vim.treesitter.language.inspect()`. Also graduate the `abi_version` field, as this is now the official upstream name.

---------

Co-authored-by: Christian Clason &lt;c.clason@uni-graz.at&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>feat(treesitter): table of contents for checkhealth, markdown (#32282)</title>
<updated>2025-02-22T12:07:21+00:00</updated>
<author>
<name>Christian Clason</name>
<email>c.clason@uni-graz.at</email>
</author>
<published>2025-02-22T12:07:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=2e5b560482fb76342387e7183283efe9d431f114'/>
<id>2e5b560482fb76342387e7183283efe9d431f114</id>
<content type='text'>
Problem: It's difficult to navigate large structured text files (vim
help, checkhealth, Markdown).

Solution: Support `gO` for table of contents and `]]`/`[[` for moving
between headings for all these filetypes using treesitter queries.

Refactor: colorization of highlight groups is moved to the `help` ftplugin
while headings-related functionality is implemented in a private
`vim.treesitter` module for possible future use for other filetypes.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem: It's difficult to navigate large structured text files (vim
help, checkhealth, Markdown).

Solution: Support `gO` for table of contents and `]]`/`[[` for moving
between headings for all these filetypes using treesitter queries.

Refactor: colorization of highlight groups is moved to the `help` ftplugin
while headings-related functionality is implemented in a private
`vim.treesitter` module for possible future use for other filetypes.</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>fix(treesitter): don't return error message on success #31955</title>
<updated>2025-01-10T22:46:19+00:00</updated>
<author>
<name>Guilherme Soares</name>
<email>48023091+guilhas07@users.noreply.github.com</email>
</author>
<published>2025-01-10T22:46:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=aa2b44fbb07f3ab4dd00ea4a3ae7c5d31bc20a9d'/>
<id>aa2b44fbb07f3ab4dd00ea4a3ae7c5d31bc20a9d</id>
<content type='text'>
Problem:
The `vim.treesitter.language.add` function returns
a error message even when it succeeds.

Solution:
Don't return error message on success.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
The `vim.treesitter.language.add` function returns
a error message even when it succeeds.

Solution:
Don't return error message on success.</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>
<entry>
<title>perf(validate): use lighter version</title>
<updated>2024-10-17T15:53:52+00:00</updated>
<author>
<name>Lewis Russell</name>
<email>lewis6991@gmail.com</email>
</author>
<published>2024-10-16T16:03:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=3f3e4837d5f7d2d9cb1c89bd3a5b2ee8a730772a'/>
<id>3f3e4837d5f7d2d9cb1c89bd3a5b2ee8a730772a</id>
<content type='text'>
- Also fix `vim.validate()` for PUC Lua when showing errors for values
  that aren't string or number.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Also fix `vim.validate()` for PUC Lua when showing errors for values
  that aren't string or number.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix(treesitter): remove duplicate symbol names in language.inspect()</title>
<updated>2024-10-11T16:15:07+00:00</updated>
<author>
<name>Riley Bruins</name>
<email>ribru17@hotmail.com</email>
</author>
<published>2024-09-19T20:08:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=d3193afc2559e7d84ed2d76664a650dc03b4c6ef'/>
<id>d3193afc2559e7d84ed2d76664a650dc03b4c6ef</id>
<content type='text'>
**Problems:**

- `vim.treesitter.language.inspect()` returns duplicate
  symbol names, sometimes up to 6 of one kind in the case of `markdown`
- The list-like `symbols` table can have holes and is thus not even a
  valid msgpack table anyway, mentioned in a test

**Solution:** Return symbols as a map, rather than a list, where field
names are the names of the symbol. The boolean value associated with the
field encodes whether or not the symbol is named.

Note that anonymous nodes are surrounded with double quotes (`"`) to
prevent potential collisions with named counterparts that have the same
identifier.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
**Problems:**

- `vim.treesitter.language.inspect()` returns duplicate
  symbol names, sometimes up to 6 of one kind in the case of `markdown`
- The list-like `symbols` table can have holes and is thus not even a
  valid msgpack table anyway, mentioned in a test

**Solution:** Return symbols as a map, rather than a list, where field
names are the names of the symbol. The boolean value associated with the
field encodes whether or not the symbol is named.

Note that anonymous nodes are surrounded with double quotes (`"`) to
prevent potential collisions with named counterparts that have the same
identifier.
</pre>
</div>
</content>
</entry>
<entry>
<title>feat(treesitter)!: use return values in `language.add()`</title>
<updated>2024-09-29T13:27:16+00:00</updated>
<author>
<name>Christian Clason</name>
<email>c.clason@uni-graz.at</email>
</author>
<published>2024-09-15T12:19:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=99e0facf3a001608287ec6db69b01c77443c7b9d'/>
<id>99e0facf3a001608287ec6db69b01c77443c7b9d</id>
<content type='text'>
Problem: No clear way to check whether parsers are available for a given
language.

Solution: Make `language.add()` return `true` if a parser was
successfully added and `nil` otherwise. Use explicit `assert` instead of
relying on thrown errors.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem: No clear way to check whether parsers are available for a given
language.

Solution: Make `language.add()` return `true` if a parser was
successfully added and `nil` otherwise. Use explicit `assert` instead of
relying on thrown errors.
</pre>
</div>
</content>
</entry>
<entry>
<title>feat(treesitter)!: add default fallback to `ft_to_lang` lookups</title>
<updated>2024-09-29T13:27:16+00:00</updated>
<author>
<name>Christian Clason</name>
<email>c.clason@uni-graz.at</email>
</author>
<published>2024-09-14T11:27:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=041d98fe8d892a81ed659c32be5360d4f80e7d18'/>
<id>041d98fe8d892a81ed659c32be5360d4f80e7d18</id>
<content type='text'>
Problem: Language names are only registered for filetype&lt;-&gt;language
lookups when parsers are actually loaded; this means users cannot rely
on `vim.treesitter.language.get_lang()` or `get_filetypes()` to return
the correct value when language and filetype coincide and always need to
add explicit fallbacks.

Solution: Always return the language name as valid filetype in
`get_filetypes()`, and default to the filetype in `get_lang()`. Document
this behavior.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem: Language names are only registered for filetype&lt;-&gt;language
lookups when parsers are actually loaded; this means users cannot rely
on `vim.treesitter.language.get_lang()` or `get_filetypes()` to return
the correct value when language and filetype coincide and always need to
add explicit fallbacks.

Solution: Always return the language name as valid filetype in
`get_filetypes()`, and default to the filetype in `get_lang()`. Document
this behavior.
</pre>
</div>
</content>
</entry>
<entry>
<title>feat(treesitter): add support for wasm parsers</title>
<updated>2024-08-26T14:44:03+00:00</updated>
<author>
<name>Lewis Russell</name>
<email>lewis6991@gmail.com</email>
</author>
<published>2024-04-19T15:04:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.josher.dev/rneovim.git/commit/?id=688b961d13bd54a14836f08c3ded3121d3fb15a0'/>
<id>688b961d13bd54a14836f08c3ded3121d3fb15a0</id>
<content type='text'>
Problem: Installing treesitter parser is hard (harder than
climbing to heaven).

Solution: Add optional support for wasm parsers with `wasmtime`.

Notes:

* Needs to be enabled by setting `ENABLE_WASMTIME` for tree-sitter and
  Neovim. Build with
  `make CMAKE_EXTRA_FLAGS=-DENABLE_WASMTIME=ON
  DEPS_CMAKE_FLAGS=-DENABLE_WASMTIME=ON`
* Adds optional Rust (obviously) and C11 dependencies.
* Wasmtime comes with a lot of features that can negatively affect
  Neovim performance due to library and symbol table size. Make sure to
  build with minimal features and full LTO.
* To reduce re-compilation times, install `sccache` and build with
  `RUSTC_WRAPPER=&lt;path/to/sccache&gt; make ...`
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem: Installing treesitter parser is hard (harder than
climbing to heaven).

Solution: Add optional support for wasm parsers with `wasmtime`.

Notes:

* Needs to be enabled by setting `ENABLE_WASMTIME` for tree-sitter and
  Neovim. Build with
  `make CMAKE_EXTRA_FLAGS=-DENABLE_WASMTIME=ON
  DEPS_CMAKE_FLAGS=-DENABLE_WASMTIME=ON`
* Adds optional Rust (obviously) and C11 dependencies.
* Wasmtime comes with a lot of features that can negatively affect
  Neovim performance due to library and symbol table size. Make sure to
  build with minimal features and full LTO.
* To reduce re-compilation times, install `sccache` and build with
  `RUSTC_WRAPPER=&lt;path/to/sccache&gt; make ...`
</pre>
</div>
</content>
</entry>
</feed>
