aboutsummaryrefslogtreecommitdiffstats
path: root/tests/query/highlights_spec.lua
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2022-10-02 11:58:55 +0200
committerStephan Seitz <stephan.seitz@fau.de>2022-10-02 09:29:34 -0400
commit8e763332b7bf7b3a426fd8707b7f5aa85823a5ac (patch)
treea64cd852087b85d6c21f15022692966b9924a8ce /tests/query/highlights_spec.lua
parentUpdate lockfile.json (diff)
downloadnvim-treesitter-8e763332b7bf7b3a426fd8707b7f5aa85823a5ac.tar
nvim-treesitter-8e763332b7bf7b3a426fd8707b7f5aa85823a5ac.tar.gz
nvim-treesitter-8e763332b7bf7b3a426fd8707b7f5aa85823a5ac.tar.bz2
nvim-treesitter-8e763332b7bf7b3a426fd8707b7f5aa85823a5ac.tar.lz
nvim-treesitter-8e763332b7bf7b3a426fd8707b7f5aa85823a5ac.tar.xz
nvim-treesitter-8e763332b7bf7b3a426fd8707b7f5aa85823a5ac.tar.zst
nvim-treesitter-8e763332b7bf7b3a426fd8707b7f5aa85823a5ac.zip
fix(test): update tests to Nvim 0.8
Diffstat (limited to 'tests/query/highlights_spec.lua')
-rw-r--r--tests/query/highlights_spec.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/query/highlights_spec.lua b/tests/query/highlights_spec.lua
index c3c7d1530..ec3a3913f 100644
--- a/tests/query/highlights_spec.lua
+++ b/tests/query/highlights_spec.lua
@@ -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