diff options
Diffstat (limited to 'runtime/lua/vim/treesitter')
| -rw-r--r-- | runtime/lua/vim/treesitter/highlighter.lua | 4 | ||||
| -rw-r--r-- | runtime/lua/vim/treesitter/query.lua | 7 | 
2 files changed, 8 insertions, 3 deletions
| diff --git a/runtime/lua/vim/treesitter/highlighter.lua b/runtime/lua/vim/treesitter/highlighter.lua index 84b6a5f135..cf3cdf4505 100644 --- a/runtime/lua/vim/treesitter/highlighter.lua +++ b/runtime/lua/vim/treesitter/highlighter.lua @@ -248,7 +248,7 @@ local function on_line_impl(self, buf, line)      end      while line >= state.next_row do -      local capture, node = state.iter() +      local capture, node, metadata = state.iter()        if capture == nil then break end @@ -260,7 +260,7 @@ local function on_line_impl(self, buf, line)                                 { end_line = end_row, end_col = end_col,                                   hl_group = hl,                                   ephemeral = true, -                                 priority = 100 -- Low but leaves room below +                                 priority = tonumber(metadata.priority) or 100 -- Low but leaves room below                                  })        end        if start_row > line then diff --git a/runtime/lua/vim/treesitter/query.lua b/runtime/lua/vim/treesitter/query.lua index b81eb18945..4ecd91d295 100644 --- a/runtime/lua/vim/treesitter/query.lua +++ b/runtime/lua/vim/treesitter/query.lua @@ -351,7 +351,12 @@ function M.add_directive(name, handler, force)    directive_handlers[name] = handler  end ---- Returns the list of currently supported predicates +--- @return The list of supported directives. +function M.list_directives() +  return vim.tbl_keys(directive_handlers) +end + +--- @return The list of supported predicates.  function M.list_predicates()    return vim.tbl_keys(predicate_handlers)  end | 
