Christian Clason

Results 1361 comments of Christian Clason

Hmm, good question. A "trim empty lines" predicate may be useful in general, if feasible.

In any case, you could add `latex` to the list (and probably `markdown` as well).

A `#trim!` could be doable; look at https://github.com/neovim/neovim/blob/5c4ec254784e7e92f61b69114c6091a198fe600f/runtime/lua/vim/treesitter/query.lua#L307-L345 (Could also be added locally via `vim.treesitter.query.add_directive()`.)

Apparently, `latex` has bigger issues with folding... Maybe leave it out for now.

> That was harder than I thought it would be. sorry :(

PR/tracking issue welcome :) (Seriously: `#offset!` was meant to be a temporary stop-gap for injections until the directive handling was generalized -- which never happened. https://github.com/neovim/neovim/pull/14046 for context.)

What is the status here? I think a `trim` directive could be useful in core as well. Regarding folds: I believe I've heard general dissatisfaction with the current implementation and...

> I think this would be useful in core too, but we should at least get it merged here for a while first. Makes sense, in particular while core is...

This will likely require changes in Neovim core, but I want to discuss here what the general design should be, as the code here involves adapting captures and highlight groups.

> The hightlighting in core is not related to this project at all. I disagree. This project is very much (also) an out-of-tree rapid prototype for stuff that _will_ be...