diff --git a/lua/nvim-treesitter-playground/hl-info.lua b/lua/nvim-treesitter-playground/hl-info.lua index 7ecb5d3..7dc7a73 100644 --- a/lua/nvim-treesitter-playground/hl-info.lua +++ b/lua/nvim-treesitter-playground/hl-info.lua @@ -14,12 +14,6 @@ function M.get_treesitter_hl() local highlights = {} for _, hl in pairs(results) do local line = "* **@" .. hl.capture .. "**" - if hl.specific then - line = line .. " -> **" .. hl.specific .. "**" - end - if hl.general then - line = line .. " -> **" .. hl.general .. "**" - end if hl.priority then line = line .. "(" .. hl.priority .. ")" end diff --git a/lua/nvim-treesitter-playground/utils.lua b/lua/nvim-treesitter-playground/utils.lua index aa85315..6822df3 100644 --- a/lua/nvim-treesitter-playground/utils.lua +++ b/lua/nvim-treesitter-playground/utils.lua @@ -65,12 +65,7 @@ function M.get_hl_groups_at_position(bufnr, row, col) if hl and ts_utils.is_in_node_range(node, row, col) then local c = query._query.captures[capture] -- name of the capture in the query if c ~= nil then - local general_hl, is_vim_hl = c, false - local local_hl = not is_vim_hl and (tree:lang() .. general_hl) - table.insert( - matches, - { capture = c, specific = local_hl, general = general_hl, priority = metadata.priority } - ) + table.insert(matches, { capture = c, priority = metadata.priority }) end end end