fix: better check for support of new highlight groups
This commit is contained in:
parent
eab88d434d
commit
afd9c6137a
@ -1,10 +1,7 @@
|
|||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
-- new in 0.8 something
|
|
||||||
local has_new_group_names = vim.fn.hlexists("@comment") ~= 0
|
|
||||||
|
|
||||||
function M.get(group)
|
function M.get(group)
|
||||||
if group:sub(1, 1) ~= "@" or has_new_group_names then
|
if group:sub(1, 1) ~= "@" or not vim.treesitter.highlighter.hl_map then
|
||||||
return group
|
return group
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user