mirror of
https://github.com/neovim/neovim.git
synced 2025-10-17 07:16:09 +00:00
feat(treesitter): vertical conceal support for highlighter
TSHighlighter now places marks for conceal_lines metadata. A new internal decor provider callback _on_conceal_line was added that instructs the highlighter to place conceal_lines marks whenever the editor needs to know whether a line is concealed. The bundled markdown queries use conceal_lines metadata to conceal code block fence lines.
This commit is contained in:
@@ -1049,6 +1049,7 @@ void nvim_set_decoration_provider(Integer ns_id, Dict(set_decoration_provider) *
|
||||
{ "on_end", &opts->on_end, &p->redraw_end },
|
||||
{ "_on_hl_def", &opts->_on_hl_def, &p->hl_def },
|
||||
{ "_on_spell_nav", &opts->_on_spell_nav, &p->spell_nav },
|
||||
{ "_on_conceal_line", &opts->_on_conceal_line, &p->conceal_line },
|
||||
{ NULL, NULL, NULL },
|
||||
};
|
||||
|
||||
|
@@ -21,6 +21,7 @@ typedef struct {
|
||||
LuaRefOf(("end" _, Integer tick)) on_end;
|
||||
LuaRefOf(("hl_def" _)) _on_hl_def;
|
||||
LuaRefOf(("spell_nav" _)) _on_spell_nav;
|
||||
LuaRefOf(("conceal_line" _)) _on_conceal_line;
|
||||
} Dict(set_decoration_provider);
|
||||
|
||||
typedef struct {
|
||||
|
Reference in New Issue
Block a user