mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
feat!: remove obsolete TS* highlight groups
This commit is contained in:
parent
4cccb6f494
commit
42ab95d5e1
8 changed files with 25 additions and 572 deletions
|
|
@ -5,8 +5,8 @@
|
|||
|
||||
auto main( int argc, char** argv ) -> int
|
||||
// ^ parameter
|
||||
// ^ type
|
||||
// ^ TSType
|
||||
// ^ type
|
||||
// ^ type
|
||||
// ^ operator
|
||||
{
|
||||
std::cout << "Hello world!" << std::endl;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1,28 +1,28 @@
|
|||
# H1
|
||||
<!-- <- TSPunctSpecial -->
|
||||
<!-- <- punctuation.special -->
|
||||
|
||||
## H2
|
||||
<!-- <- TSPunctSpecial -->
|
||||
<!-- <- punctuation.special -->
|
||||
|
||||
- Item 1
|
||||
- Item 2
|
||||
<!-- <- TSPunctSpecial -->
|
||||
<!-- <- punctuation.special -->
|
||||
|
||||
1. Item 1
|
||||
2. Item 2
|
||||
<!-- <- TSPunctSpecial -->
|
||||
<!-- <- punctuation.special -->
|
||||
|
||||
----
|
||||
<!-- ^ TSTextReference -->
|
||||
<!-- ^ TSURI -->
|
||||
<!-- ^ TSLiteral -->
|
||||
<!--^ TSPunctDelimiter -->
|
||||
<!-- ^ TSPunctDelimiter -->
|
||||
<!-- //TODO: currently disabled TSPunctDelimiter -->
|
||||
<!-- ^ text.reference -->
|
||||
<!-- ^ text.uri -->
|
||||
<!-- ^ text.literal -->
|
||||
<!--^ punctuation.delimiter -->
|
||||
<!-- ^ punctuation.delimiter -->
|
||||
<!-- //TODO: currently disabled punctuation.delimiter -->
|
||||
|
||||
[link_text](#local_reference "link go brr...")
|
||||
<!-- ^ TSTextReference -->
|
||||
<!-- ^ TSURI -->
|
||||
<!-- ^ TSLiteral -->
|
||||
<!-- <- TSPunctDelimiter -->
|
||||
<!-- //TODO: currently disabled TSPunctDelimiter -->
|
||||
<!-- ^ text.reference -->
|
||||
<!-- ^ text.uri -->
|
||||
<!-- ^ text.literal -->
|
||||
<!-- <- punctuation.delimiter -->
|
||||
<!-- //TODO: currently disabled punctuation.delimiter -->
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue