refactor: move out function to retrieve highlight

This commit is contained in:
2025-05-02 23:31:41 +02:00
parent 7de0efdc5e
commit 3c4a96442a
2 changed files with 13 additions and 10 deletions
+10
View File
@@ -395,4 +395,14 @@ function M.debounce_with_id(fn, delay)
end
end
function M.get_hl_source(name)
local hl = vim.api.nvim_get_hl(0, { name = name })
while hl.link do
hl = vim.api.nvim_get_hl(0, { name = hl.link })
end
return hl
end
return M