Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Labels aren't highlighted in certain colorscheme, reopening #250 #257

Open
Masquue opened this issue Nov 25, 2024 · 0 comments
Open

Labels aren't highlighted in certain colorscheme, reopening #250 #257

Masquue opened this issue Nov 25, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Masquue
Copy link

Masquue commented Nov 25, 2024

Reopening issue #250. Labels still are not working correctly in some colorschemes for me.

After some digging, the issue seems to stem from LeapLabel being used instead of LeapLabelPrimary when no defaults are provided by user.

The problem is in

local function _2_(_, key)
if (key == "label") then
if pcall(api.nvim_get_hl_by_name, "LeapLabel", false) then
return "LeapLabel"
else
return "LeapLabelPrimary"
end

where the deprecated function nvim_get_hl_by_name is used.

And unfortunately it seem to have some unfixed bug related to it which would return a non empty table { [true] = 6 } when calling with some highlight group, in this case LeapLabel, resulting LeapLabel being used as match.label.

Replacing use of nvim_get_hl_by_name by nvim_get_hl would fix it for me.

And I suggest nvim_get_hl_by_name should not be used in other places as well, after all it is deprecated.

@ggandor ggandor added the bug Something isn't working label Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants