Closed lougreenwood closed 3 months ago
Investigating now, in the meantime I moved this to the correct repository
@lougreenwood can you please provide a minimal reproduction repro.lua
that gets to this error? That will greatly help me in debugging. You can take a look at the template when opening a new issue on AstroNvim since I see that you deleted the one provided by default
Upon an initial investigation I cannot replicate this at all
Basically all of those modules are loaded post setup()
call and therefore the config should be set fully before any of this code is running. We don't want to re-evaluate the config each time if that makes sense
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions.
Checklist
Neovim version (nvim -v)
0.9.5
Operating system/version
macOS 14.4.1
Terminal/GUI
iTerm
Describe the bug
❗ I need to do some more investigation and narrow down a reproduction, so this issue is preliminary for now.
The issue I'm facing is related to porting my custom tab pages heirline config to V4. I get the following error:
If I print the contents of
config
fromfile_icon
inastroui/status/hl
on line 68, like this:I see that the config is empty:
.
This is wrong, since I have the following config for
astroui
:If I modify
hl.lua
on line 12, so that the definition ofconfig
becomes an inline function - resulting in the config is always re-evaluated, I see that the expected value, like this:and update uses of![Screenshot 2024-04-10 at 17 25 33](https://github.com/AstroNvim/AstroNvim/assets/12051736/3910bf41-eda2-4a20-9d81-7b883057106a)
config
toconfig()
, I see the expected values when I printconfig
fromfile_icon
:Converting to a function also fixes the error shown at the start of this issue, since
config().icon_hightlights.file_icon[name]
inhl.lua
now has a valid value.This feels like a timing issue, but I see that
astroui
has a priority of 1000 and islazy = false
, so I'd expect it to be already setup and ready to go by the time that I use it via my heirline config.I'll try to debug some more later and narrow this down to a repro and update this issue - I just needed to get this out whilst I had the motivation to write it up!
Steps to Reproduce
todo
Expected behavior
n/a
Screenshots
No response
Additional Context
No response
Repro
No response