You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is wrong, since I have the following config for astroui:
return {
"AstroNvim/astroui",
---@typeAstroUIOptsopts= {
-- change colorschemecolorscheme="dracula",
-- AstroUI allows you to easily modify highlight groups easily for any and all colorschemeshighlights= {
init= { -- this table overrides highlights in all themes-- Normal = { bg = "#000000" },
},
astrotheme= { -- a table of overrides/changes when applying the astrotheme theme-- Normal = { bg = "#000000" },
},
},
status= {
-- Configure attributes of components defined in the `status` API. Check the AstroNvim documentation for a complete list of color names, this applies to colors that have `_fg` and/or `_bg` names with the suffix removed (ex. `git_branch_fg` as attributes from `git_branch`).attributes= {
git_branch= { bold=true },
},
-- Configure colors of components defined in the `status` API. Check the AstroNvim documentation for a complete list of color names.colors= {
git_branch_fg="#ABCDEF",
},
-- Configure which icons that are highlighted based on contexticon_highlights= {
-- enable or disable breadcrumb icon highlightingbreadcrumbs=false,
-- Enable or disable the highlighting of filetype icons both in the statusline and tablinefile_icon= {
tabline=function(self) returnself.is_activeorself.is_visibleend,
statusline=true,
},
},
-- Configure characters used as separators for various elementsseparators= {
none= { "", "" },
left= { "", "" },
right= { "", "" },
center= { "", "" },
tab= { "", "" },
breadcrumbs=" ",
path=" ",
},
},
-- Icons can be configured throughout the interfaceicons= {
-- configure the loading of the lsp in the status lineLSPLoading1="⠋",
LSPLoading2="⠙",
LSPLoading3="⠹",
LSPLoading4="⠸",
LSPLoading5="⠼",
LSPLoading6="⠴",
LSPLoading7="⠦",
LSPLoading8="⠧",
LSPLoading9="⠇",
LSPLoading10="⠏",
},
},
}
If I modify hl.lua on line 12, so that the definition of config becomes an inline function - resulting in the config is always re-evaluated, I see that the expected value, like this:
localconfig=function() returnassert(require("astroui").config.status) end
and update uses of config to config(), I see the expected values when I print config from file_icon:
Converting to a function also fixes the error shown at the start of this issue, since config().icon_hightlights.file_icon[name] in hl.lua now has a valid value.
This feels like a timing issue, but I see that astroui has a priority of 1000 and is lazy = 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
The text was updated successfully, but these errors were encountered:
@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
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
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
The text was updated successfully, but these errors were encountered: