Closed hnbnh closed 1 year ago
Huh, that's weird, I just tried your configuration and it gave me the correct highlighting.
I'd guess it's one of two things:
{
'jinh0/eyeliner.nvim',
commit = "02f59335bbab955de33f93d2e8c53417a06cfc2f",
-- the rest of your config
}
:hi EyelinerPrimary
and :hi EyelinerSecondary
? If they're the same, that might be why they look the same.You was right, the highlighted colors was the same
EyelinerPrimary xxx cterm= gui= guifg=#ffa066
EyelinerSecondary xxx cterm= gui= guifg=#ffa066
Unfortunately I still have incorrect colors after updating the highlight groups
Here is a minimal init.lua
:
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath })
vim.fn.system({ "git", "-C", lazypath, "checkout", "tags/stable" }) -- last stable release
end
vim.opt.rtp:prepend(lazypath)
local plugins = {
{
"rebelot/kanagawa.nvim",
lazy = false,
config = function()
require("kanagawa").setup()
vim.cmd.colorscheme("kanagawa")
end,
},
{
"jinh0/eyeliner.nvim",
event = "VeryLazy",
commit = "02f59335bbab955de33f93d2e8c53417a06cfc2f",
config = function()
vim.api.nvim_set_hl(0, "EyelinerPrimary", { fg = "red", bold = true, underline = true })
vim.api.nvim_set_hl(0, "EyelinerSecondary", { fg = "orange", underline = true })
require("eyeliner").setup({
highlight_on_key = true, -- show highlights only after keypress
dim = true, -- dim all other characters if set to true (recommended!)
})
end,
},
}
require("lazy").setup(plugins, {
defaults = { lazy = true, version = nil },
checker = { enabled = false },
})
That seems to be the right highlighting to me: the u and c are yellow since there's already a u and c in the sentence before it.
Could you explain what is incorrect?
I thought it would behave the same as the demo:
Maybe the algorithm has been updated or something?
Yeah, I updated the algorithm. Technically the demo on the README has a bug since the "n" in "On" shouldn't be highlighted (you're already on the word). The highlight groups are correct in your screenshot.
Thanks for letting me know that the README video is outdated, I'll update it soon!
Describe the bug
The letter
u
is highlighted incorrectlyExpected behavior
The letter
u
inJuly
should be highlighted instead ofyoung
Neovim version
v0.8.2
Configuration (with lazy.nvim)