mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
fix(test): update tests to Nvim 0.8
This commit is contained in:
parent
28f5458424
commit
8e763332b7
2 changed files with 5 additions and 5 deletions
|
|
@ -10,7 +10,7 @@ local M = {}
|
|||
-- Note: Some highlight groups may not be applied upstream, some may be experimental
|
||||
-- TODO(clason): deprecated and will be removed for Nvim 0.8
|
||||
|
||||
local default_map = {
|
||||
M.default_map = {
|
||||
["annotation"] = "TSAnnotation",
|
||||
|
||||
["attribute"] = "TSAttribute",
|
||||
|
|
@ -132,7 +132,7 @@ end
|
|||
|
||||
local function link_all_captures()
|
||||
if link_captures then
|
||||
for capture, hlgroup in pairs(default_map) do
|
||||
for capture, hlgroup in pairs(M.default_map) do
|
||||
link_captures(capture, hlgroup)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
require "nvim-treesitter.highlight" -- yes, this is necessary to set the hlmap
|
||||
local ts_highlight = require "nvim-treesitter.highlight" -- yes, this is necessary to set the hlmap
|
||||
local highlighter = require "vim.treesitter.highlighter"
|
||||
local ts_utils = require "nvim-treesitter.ts_utils"
|
||||
local parsers = require "nvim-treesitter.parsers"
|
||||
|
|
@ -70,9 +70,9 @@ local function check_assertions(file)
|
|||
assert.is.number(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
|
||||
if c ~= nil and c ~= "spell" and c ~= "conceal" then
|
||||
captures[c] = true
|
||||
local general_hl = query:_get_hl_from_capture(capture)
|
||||
local general_hl = ts_highlight.default_map[c]
|
||||
highlights[general_hl] = true
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue