astronvim / astroui Goto Github PK
View Code? Open in Web Editor NEWUI Configuration Engine built for AstroNvim
Home Page: https://AstroNvim.com
License: GNU General Public License v3.0
UI Configuration Engine built for AstroNvim
Home Page: https://AstroNvim.com
License: GNU General Public License v3.0
v0.10.0-dev+2507-g3df1211eb
Linux fedora 6.7.7-200.fc39.x86_64
kitty 0.31.0
We're faced with some issues when we start using Quickfix and Loclist; these issues mostly include the ones I've found so far, and chance are that it's not inclusive so it's probably make sense to consider it as meta.
Here's how it should look in practice:
Here's how it currently look:
One thing is that it almost looks as intended on the dashboard (minus the status column):
0.9.5
macOS 14.4.1
iTerm
❗ 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
from file_icon
in astroui/status/hl
on line 68, like this:
function M.file_icon(name)
print(vim.inspect(config))
local hl_enabled = config.icon_highlights.file_icon[name]
return function(self)
if hl_enabled == true or (type(hl_enabled) == "function" and hl_enabled(self)) then
return M.filetype_color(self)
end
end
end
I see that the config is empty:
.
This is wrong, since I have the following config for astroui
:
return {
"AstroNvim/astroui",
---@type AstroUIOpts
opts = {
-- change colorscheme
colorscheme = "dracula",
-- AstroUI allows you to easily modify highlight groups easily for any and all colorschemes
highlights = {
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 context
icon_highlights = {
-- enable or disable breadcrumb icon highlighting
breadcrumbs = false,
-- Enable or disable the highlighting of filetype icons both in the statusline and tabline
file_icon = {
tabline = function(self) return self.is_active or self.is_visible end,
statusline = true,
},
},
-- Configure characters used as separators for various elements
separators = {
none = { "", "" },
left = { "", " " },
right = { " ", "" },
center = { " ", " " },
tab = { "", "" },
breadcrumbs = " ",
path = " ",
},
},
-- Icons can be configured throughout the interface
icons = {
-- configure the loading of the lsp in the status line
LSPLoading1 = "⠋",
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:
local config = function() return assert(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!
todo
n/a
No response
No response
No response
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.