Closed CodePurble closed 3 years ago
That's not a bug. You defined the hl
wrong. The hl
for the vi_mode
component is supposed to be a function that returns those values. Like this:
hl = function()
return {
fg = "black",
bg = vi_mode_utils.get_mode_color(),
style = "bold"
}
end
The issue with what you did is that the vi_mode_utils.get_mode_color()
gets called once when the configuration is being evaluated, not while Feline is parsing it
You are also missing LINES
from your vi_mode_colors
table. If you omit it, you will get an error when you use Visual line mode.
See: https://github.com/famiu/feline.nvim/blob/5d152e2cc28c172b42f4caba8baf0973f6a6ece6/lua/feline/defaults.lua#L43-L59
That's not a bug. You defined the
hl
wrong. Thehl
for thevi_mode
component is supposed to be a function that returns those values. Like this:hl = function() return { fg = "black", bg = vi_mode_utils.get_mode_color(), style = "bold" } end
The issue with what you did is that the
vi_mode_utils.get_mode_color()
gets called once when the configuration is being evaluated, not while Feline is parsing it
Thanks for pointing that out. That has fixed it. I'll remember that.
Neovim version
Feline version
v0.1.1
Describe the bug I keep getting this error message every time I open
neovim
, andfeline
fails to load.Error:
To Reproduce Open
neovim
with a customfeline
configExpected behavior
feline
should load correctlyDoes this error occur in the minimal init file? Yes, it occurs
Provide modified minimal_init.lua
Screenshots
Additional context The configuration used to work fine until I moved to
v0.1.1