Skip to content

Commit

Permalink
perf(block): use hl_ids directly as hl_group for extmarks. no need to…
Browse files Browse the repository at this point in the history
… use synIDattr
  • Loading branch information
folke committed Nov 18, 2024
1 parent 2626b4a commit 742610e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/noice/text/block.lua
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ function Block:append(contents, highlight)
---@type string|table|nil
local hl_group
if type(hl_id) == "number" then
hl_group = vim.fn.synIDattr(hl_id, "name")
hl_group = { hl_group = hl_id }
elseif type(attr_id) == "number" then
hl_group = attr_id ~= 0 and Highlight.get_hl_group(attr_id) or nil
else
Expand Down

0 comments on commit 742610e

Please sign in to comment.