Skip to content

Commit

Permalink
fix: Translate synID before getting its color
Browse files Browse the repository at this point in the history
  • Loading branch information
reobin committed Feb 3, 2025
1 parent aa089a5 commit 38cb1d9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions lua/extractor/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ local function configure_colorscheme(colorscheme)
if configured_colorscheme ~= colorscheme then
error("Failed to configure colorscheme: " .. colorscheme)
end
vim.fn.execute("syntax on")
end

--- For each installed colorscheme, try both light and dark backgrounds, then
Expand Down
2 changes: 1 addition & 1 deletion lua/extractor/util/vim.lua
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function M.get_color_group_value(color_group_name, attribute)
return nil
end

local color_group_value = vim.fn.synIDattr(synID, attribute)
local color_group_value = vim.fn.synIDattr(vim.fn.synIDtrans(synID), attribute)
if color_group_value == "" then
return nil
end
Expand Down

0 comments on commit 38cb1d9

Please sign in to comment.