From 42ab95d5e11f247c6f0c8f5181b02e816caa4a4f Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Sun, 16 Oct 2022 14:52:15 +0200 Subject: feat!: remove obsolete `TS*` highlight groups --- tests/query/highlights/cpp/test.cpp | 4 ++-- tests/query/highlights/lua/test.lua | 12 ++++++------ tests/query/highlights/markdown/test.md | 30 +++++++++++++++--------------- tests/query/highlights_spec.lua | 4 +--- 4 files changed, 24 insertions(+), 26 deletions(-) (limited to 'tests/query') diff --git a/tests/query/highlights/cpp/test.cpp b/tests/query/highlights/cpp/test.cpp index 0a13956fa..4dd138e7e 100644 --- a/tests/query/highlights/cpp/test.cpp +++ b/tests/query/highlights/cpp/test.cpp @@ -5,8 +5,8 @@ auto main( int argc, char** argv ) -> int // ^ parameter - // ^ type - // ^ TSType + // ^ type + // ^ type // ^ operator { std::cout << "Hello world!" << std::endl; diff --git a/tests/query/highlights/lua/test.lua b/tests/query/highlights/lua/test.lua index 22da22565..efb9a9994 100644 --- a/tests/query/highlights/lua/test.lua +++ b/tests/query/highlights/lua/test.lua @@ -1,13 +1,13 @@ local a = { 1, 2, 3, 4, 5 } --- ^ TSNumber ^ TSPunctBracket --- ^ TSVariable +-- ^ number ^ punctuation.bracket +-- ^ variable local _ = next(a) --- ^ TSFuncBuiltin --- ^ TSKeyword +-- ^ function.builtin +-- ^ keyword _ = next(a) --- ^ TSFuncBuiltin +-- ^ function.builtin next(a) --- ^ TSFuncBuiltin +-- ^ function.builtin diff --git a/tests/query/highlights/markdown/test.md b/tests/query/highlights/markdown/test.md index 6f3421ca2..9423d3e85 100644 --- a/tests/query/highlights/markdown/test.md +++ b/tests/query/highlights/markdown/test.md @@ -1,28 +1,28 @@ # H1 - + ## H2 - + - Item 1 - Item 2 - + 1. Item 1 2. Item 2 - + ----![image_description](https://example.com/image.jpg "awesome image title") - - - - - - + + + + + + [link_text](#local_reference "link go brr...") - - - - - + + + + + diff --git a/tests/query/highlights_spec.lua b/tests/query/highlights_spec.lua index ec3a3913f..ff022ba21 100644 --- a/tests/query/highlights_spec.lua +++ b/tests/query/highlights_spec.lua @@ -1,4 +1,3 @@ -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" @@ -72,8 +71,7 @@ local function check_assertions(file) local c = query._query.captures[capture] -- name of the capture in the query if c ~= nil and c ~= "spell" and c ~= "conceal" then captures[c] = true - local general_hl = ts_highlight.default_map[c] - highlights[general_hl] = true + highlights[c] = true end end end -- cgit v1.2.3-70-g09d2