fix(extras): fix fzf extra colors script

This commit is contained in:
Redoxahmii 2026-08-15 09:32:50 +05:00
parent 43b8aa0a2c
commit c9e2706567
3 changed files with 8 additions and 13 deletions

View file

@ -1,10 +1,10 @@
local M = {}
--- @param colors ColorScheme
function M.generate(colors)
--TODO: figure this out
-- It works inside the session if opts.transparent = false
-- some of these highlights are not initialized untill after the colorscheme is loaded
function M.generate()
-- The FZF palette is derived from resolved highlight groups, so the configured
-- style must be loaded before querying them (including in headless builds).
require("solarized-osaka.theme").setup()
local links = {
FzfLuaFzfCursorLine = "CursorLine",
FzfLuaFzfMatch = "Special",
@ -47,7 +47,6 @@ function M.generate(colors)
if vim.fn.hlexists(v[2]) == 1 then
hl_group = v[2]
end
print("Processing: " .. c .. " with hl_group: " .. hl_group)
assert(hl_group, "hl_group not found for " .. v[2])
local hl = vim.api.nvim_get_hl(0, { name = hl_group, link = false })
assert(hl, "hl not found for " .. hl_group)
@ -71,11 +70,9 @@ export FZF_DEFAULT_OPTS="$FZF_DEFAULT_OPTS \
--info=inline-right \
--ansi \
--layout=reverse \
--border=none
--border=none \
%s
"
]]
print(M.generate())
return M

View file

@ -13,9 +13,7 @@ M.extras = {
fish_themes = { ext = "theme", url = "https://fishshell.com/docs/current/interactive.html#syntax-highlighting", label = "Fish Themes" },
foot = { ext = "ini", url = "https://codeberg.org/dnkl/foot", label = "Foot" },
fuzzel = { ext = "ini", url = "https://codeberg.org/dnkl/fuzzel", label = "Fuzzel" },
-- INFO: build script not working for this, headless mode doesn't seem to be assigning all the hl groups
-- fzf = { ext = "sh", url = "https://github.com/junegunn/fzf", label = "Fzf" },
--
fzf = { ext = "sh", url = "https://github.com/junegunn/fzf", label = "Fzf" },
ghostty = { ext = "", url = "https://github.com/ghostty-org/ghostty", label = "Ghostty" },
gitui = { ext = "ron", url = "https://github.com/extrawurst/gitui", label = "GitUI" },
gnome_terminal = { ext = "dconf", url = "https://gitlab.gnome.org/GNOME/gnome-terminal", label = "GNOME Terminal" },

View file

@ -1,3 +1,3 @@
#!/usr/bin/env bash
nvim --headless --cmd "set rtp^=$PWD" +"lua require('solarized-osaka.extra').setup()" +qa
nvim --headless -u NONE --cmd "set rtp^=$PWD" +"lua require('solarized-osaka.extra').setup()" +qa