fix(highlight): ensure link captures function exists

before attempting to call it
fixes #3465
This commit is contained in:
Akin Sowemimo 2022-09-09 15:22:04 +01:00 committed by Christian Clason
parent e37e0c9b14
commit 557123a616

View file

@ -131,8 +131,10 @@ elseif not vim.g.skip_ts_default_groups then
end
local function link_all_captures()
for capture, hlgroup in pairs(default_map) do
link_captures(capture, hlgroup)
if link_captures then
for capture, hlgroup in pairs(default_map) do
link_captures(capture, hlgroup)
end
end
end