mirror of
https://github.com/boxpositron/absolute-vim.git
synced 2026-10-24 05:23:19 +00:00
feat(nvim): phase 1 — triage and abandoned-plugin cleanup
Fix keymap collision on <leader>j/<leader>k (now resize-only;
location-list moved to ]l/[l). Migrate diagnostic signs from
deprecated vim.fn.sign_define to vim.diagnostic.config. Drop
orphan after/nvim-tree.lua and the bogus require("../current-theme").
Add foundation snacks.nvim spec. Remove playground, vim-maximizer,
poet-v, git-blame, render-markdown, and all five AI plugin specs.
Enable gitsigns current_line_blame.
This commit is contained in:
@@ -0,0 +1,491 @@
|
||||
-- Theme Registry
|
||||
-- Central mapping between Neovim colorschemes and terminal themes (WezTerm, Ghostty)
|
||||
-- Maintains a curated list of popular themes with verified mappings
|
||||
|
||||
local M = {}
|
||||
|
||||
-- Core theme mappings (manually curated and tested)
|
||||
-- Each entry maps a Neovim colorscheme to its terminal equivalents
|
||||
M.themes = {
|
||||
-- ============================================================================
|
||||
-- Tokyo Night Family (5 variants)
|
||||
-- ============================================================================
|
||||
["tokyonight"] = {
|
||||
nvim = "tokyonight",
|
||||
wezterm = "Tokyo Night",
|
||||
ghostty = "TokyoNight",
|
||||
family = "tokyonight",
|
||||
variant = "night",
|
||||
description = "A clean, dark Tokyo Night theme",
|
||||
},
|
||||
["tokyonight-night"] = {
|
||||
nvim = "tokyonight-night",
|
||||
wezterm = "Tokyo Night",
|
||||
ghostty = "TokyoNight Night",
|
||||
family = "tokyonight",
|
||||
variant = "night",
|
||||
description = "Tokyo Night (night variant)",
|
||||
},
|
||||
["tokyonight-storm"] = {
|
||||
nvim = "tokyonight-storm",
|
||||
wezterm = "Tokyo Night Storm",
|
||||
ghostty = "TokyoNight Storm",
|
||||
family = "tokyonight",
|
||||
variant = "storm",
|
||||
description = "Tokyo Night (storm variant)",
|
||||
},
|
||||
["tokyonight-day"] = {
|
||||
nvim = "tokyonight-day",
|
||||
wezterm = "Tokyo Night Day",
|
||||
ghostty = "TokyoNight Day",
|
||||
family = "tokyonight",
|
||||
variant = "day",
|
||||
description = "Tokyo Night (light day variant)",
|
||||
},
|
||||
["tokyonight-moon"] = {
|
||||
nvim = "tokyonight-moon",
|
||||
wezterm = "Tokyo Night Moon",
|
||||
ghostty = "TokyoNight Moon",
|
||||
family = "tokyonight",
|
||||
variant = "moon",
|
||||
description = "Tokyo Night (moon variant)",
|
||||
},
|
||||
|
||||
-- ============================================================================
|
||||
-- Catppuccin Family (4 variants)
|
||||
-- ============================================================================
|
||||
["catppuccin"] = {
|
||||
nvim = "catppuccin",
|
||||
wezterm = "Catppuccin Mocha",
|
||||
ghostty = "Catppuccin Mocha",
|
||||
family = "catppuccin",
|
||||
variant = "mocha",
|
||||
description = "Catppuccin (default mocha variant)",
|
||||
},
|
||||
["catppuccin-mocha"] = {
|
||||
nvim = "catppuccin-mocha",
|
||||
wezterm = "Catppuccin Mocha",
|
||||
ghostty = "Catppuccin Mocha",
|
||||
family = "catppuccin",
|
||||
variant = "mocha",
|
||||
description = "Catppuccin Mocha (warm, dark)",
|
||||
},
|
||||
["catppuccin-macchiato"] = {
|
||||
nvim = "catppuccin-macchiato",
|
||||
wezterm = "Catppuccin Macchiato",
|
||||
ghostty = "Catppuccin Macchiato",
|
||||
family = "catppuccin",
|
||||
variant = "macchiato",
|
||||
description = "Catppuccin Macchiato (mid-tone dark)",
|
||||
},
|
||||
["catppuccin-frappe"] = {
|
||||
nvim = "catppuccin-frappe",
|
||||
wezterm = "Catppuccin Frappe",
|
||||
ghostty = "Catppuccin Frappe",
|
||||
family = "catppuccin",
|
||||
variant = "frappe",
|
||||
description = "Catppuccin Frappe (cool, dark)",
|
||||
},
|
||||
["catppuccin-latte"] = {
|
||||
nvim = "catppuccin-latte",
|
||||
wezterm = "Catppuccin Latte",
|
||||
ghostty = "Catppuccin Latte",
|
||||
family = "catppuccin",
|
||||
variant = "latte",
|
||||
description = "Catppuccin Latte (light variant)",
|
||||
},
|
||||
|
||||
-- ============================================================================
|
||||
-- Rose Pine Family (4 variants)
|
||||
-- ============================================================================
|
||||
["rose-pine"] = {
|
||||
nvim = "rose-pine",
|
||||
wezterm = "rose-pine",
|
||||
ghostty = "Rose Pine",
|
||||
family = "rose-pine",
|
||||
variant = "main",
|
||||
description = "Rose Pine (main dark variant)",
|
||||
},
|
||||
["rose-pine-main"] = {
|
||||
nvim = "rose-pine-main",
|
||||
wezterm = "rose-pine",
|
||||
ghostty = "Rose Pine",
|
||||
family = "rose-pine",
|
||||
variant = "main",
|
||||
description = "Rose Pine (main dark variant)",
|
||||
},
|
||||
["rose-pine-moon"] = {
|
||||
nvim = "rose-pine-moon",
|
||||
wezterm = "rose-pine-moon",
|
||||
ghostty = "Rose Pine Moon",
|
||||
family = "rose-pine",
|
||||
variant = "moon",
|
||||
description = "Rose Pine Moon (darker variant)",
|
||||
},
|
||||
["rose-pine-dawn"] = {
|
||||
nvim = "rose-pine-dawn",
|
||||
wezterm = "rose-pine-dawn",
|
||||
ghostty = "Rose Pine Dawn",
|
||||
family = "rose-pine",
|
||||
variant = "dawn",
|
||||
description = "Rose Pine Dawn (light variant)",
|
||||
},
|
||||
|
||||
-- ============================================================================
|
||||
-- Nightfox Family (7 variants)
|
||||
-- ============================================================================
|
||||
["nightfox"] = {
|
||||
nvim = "nightfox",
|
||||
wezterm = "nightfox",
|
||||
ghostty = "Nightfox",
|
||||
family = "nightfox",
|
||||
variant = "night",
|
||||
description = "Nightfox (main dark variant)",
|
||||
},
|
||||
["carbonfox"] = {
|
||||
nvim = "carbonfox",
|
||||
wezterm = "carbonfox",
|
||||
ghostty = "Carbonfox",
|
||||
family = "nightfox",
|
||||
variant = "carbon",
|
||||
description = "Carbonfox (carbon variant)",
|
||||
},
|
||||
["dawnfox"] = {
|
||||
nvim = "dawnfox",
|
||||
wezterm = "dawnfox",
|
||||
ghostty = "Dawnfox",
|
||||
family = "nightfox",
|
||||
variant = "dawn",
|
||||
description = "Dawnfox (dawn variant)",
|
||||
},
|
||||
["dayfox"] = {
|
||||
nvim = "dayfox",
|
||||
wezterm = "dayfox",
|
||||
ghostty = "Dayfox",
|
||||
family = "nightfox",
|
||||
variant = "day",
|
||||
description = "Dayfox (light day variant)",
|
||||
},
|
||||
["duskfox"] = {
|
||||
nvim = "duskfox",
|
||||
wezterm = "duskfox",
|
||||
ghostty = "Duskfox",
|
||||
family = "nightfox",
|
||||
variant = "dusk",
|
||||
description = "Duskfox (dusk variant)",
|
||||
},
|
||||
["nordfox"] = {
|
||||
nvim = "nordfox",
|
||||
wezterm = "nordfox",
|
||||
ghostty = "Nordfox",
|
||||
family = "nightfox",
|
||||
variant = "nord",
|
||||
description = "Nordfox (nord-inspired variant)",
|
||||
},
|
||||
["terafox"] = {
|
||||
nvim = "terafox",
|
||||
wezterm = "terafox",
|
||||
ghostty = "Terafox",
|
||||
family = "nightfox",
|
||||
variant = "tera",
|
||||
description = "Terafox (tera variant)",
|
||||
},
|
||||
|
||||
-- ============================================================================
|
||||
-- Gruvbox Family (4 variants)
|
||||
-- ============================================================================
|
||||
["gruvbox"] = {
|
||||
nvim = "gruvbox",
|
||||
wezterm = "GruvboxDark",
|
||||
ghostty = "Gruvbox Dark",
|
||||
family = "gruvbox",
|
||||
variant = "dark",
|
||||
description = "Gruvbox (dark variant)",
|
||||
},
|
||||
["gruvbox-material"] = {
|
||||
nvim = "gruvbox-material",
|
||||
wezterm = "Gruvbox Material (Gogh)",
|
||||
ghostty = "Gruvbox Material",
|
||||
family = "gruvbox",
|
||||
variant = "material",
|
||||
description = "Gruvbox Material",
|
||||
},
|
||||
|
||||
-- ============================================================================
|
||||
-- Nord
|
||||
-- ============================================================================
|
||||
["nord"] = {
|
||||
nvim = "nord",
|
||||
wezterm = "Nord (base16)",
|
||||
ghostty = "Nord",
|
||||
family = "nord",
|
||||
variant = "main",
|
||||
description = "Nord (arctic, north-bluish color palette)",
|
||||
},
|
||||
|
||||
-- ============================================================================
|
||||
-- Dracula
|
||||
-- ============================================================================
|
||||
["dracula"] = {
|
||||
nvim = "dracula",
|
||||
wezterm = "Dracula (Official)",
|
||||
ghostty = "Dracula",
|
||||
family = "dracula",
|
||||
variant = "main",
|
||||
description = "Dracula (dark theme)",
|
||||
},
|
||||
|
||||
-- ============================================================================
|
||||
-- One Dark / One Light
|
||||
-- ============================================================================
|
||||
["onedark"] = {
|
||||
nvim = "onedark",
|
||||
wezterm = "OneDark (base16)",
|
||||
ghostty = "Atom One Dark",
|
||||
family = "onedark",
|
||||
variant = "dark",
|
||||
description = "One Dark (Atom-inspired dark theme)",
|
||||
},
|
||||
["onelight"] = {
|
||||
nvim = "onelight",
|
||||
wezterm = "One Light (base16)",
|
||||
ghostty = "Atom One Light",
|
||||
family = "onelight",
|
||||
variant = "light",
|
||||
description = "One Light (Atom-inspired light theme)",
|
||||
},
|
||||
|
||||
-- ============================================================================
|
||||
-- Material
|
||||
-- ============================================================================
|
||||
["material"] = {
|
||||
nvim = "material",
|
||||
wezterm = "MaterialDark",
|
||||
ghostty = "Material",
|
||||
family = "material",
|
||||
variant = "dark",
|
||||
description = "Material (dark variant)",
|
||||
},
|
||||
["material-darker"] = {
|
||||
nvim = "material-darker",
|
||||
wezterm = "MaterialDarker",
|
||||
ghostty = "Material Darker",
|
||||
family = "material",
|
||||
variant = "darker",
|
||||
description = "Material (darker variant)",
|
||||
},
|
||||
|
||||
-- ============================================================================
|
||||
-- Solarized
|
||||
-- ============================================================================
|
||||
["solarized-dark"] = {
|
||||
nvim = "solarized-dark",
|
||||
wezterm = "Builtin Solarized Dark",
|
||||
ghostty = "Builtin Solarized Dark",
|
||||
family = "solarized",
|
||||
variant = "dark",
|
||||
description = "Solarized Dark",
|
||||
},
|
||||
["solarized-light"] = {
|
||||
nvim = "solarized-light",
|
||||
wezterm = "Builtin Solarized Light",
|
||||
ghostty = "Builtin Solarized Light",
|
||||
family = "solarized",
|
||||
variant = "light",
|
||||
description = "Solarized Light",
|
||||
},
|
||||
|
||||
-- ============================================================================
|
||||
-- Monokai
|
||||
-- ============================================================================
|
||||
["monokai"] = {
|
||||
nvim = "monokai",
|
||||
wezterm = "Monokai Remastered",
|
||||
ghostty = "Monokai Classic",
|
||||
family = "monokai",
|
||||
variant = "main",
|
||||
description = "Monokai (classic variant)",
|
||||
},
|
||||
["monokai-pro"] = {
|
||||
nvim = "monokai-pro",
|
||||
wezterm = "Monokai Pro (Gogh)",
|
||||
ghostty = "Monokai Pro",
|
||||
family = "monokai",
|
||||
variant = "pro",
|
||||
description = "Monokai Pro",
|
||||
},
|
||||
|
||||
-- ============================================================================
|
||||
-- GitHub
|
||||
-- ============================================================================
|
||||
["github-dark"] = {
|
||||
nvim = "github-dark",
|
||||
wezterm = "GitHub Dark",
|
||||
ghostty = "GitHub Dark",
|
||||
family = "github",
|
||||
variant = "dark",
|
||||
description = "GitHub Dark",
|
||||
},
|
||||
|
||||
-- ============================================================================
|
||||
-- Ayu
|
||||
-- ============================================================================
|
||||
["ayu-dark"] = {
|
||||
nvim = "ayu-dark",
|
||||
wezterm = "Ayu Dark (Gogh)",
|
||||
ghostty = "Ayu",
|
||||
family = "ayu",
|
||||
variant = "dark",
|
||||
description = "Ayu (dark variant)",
|
||||
},
|
||||
["ayu-mirage"] = {
|
||||
nvim = "ayu-mirage",
|
||||
wezterm = "Ayu Mirage",
|
||||
ghostty = "Ayu Mirage",
|
||||
family = "ayu",
|
||||
variant = "mirage",
|
||||
description = "Ayu Mirage (mid-tone variant)",
|
||||
},
|
||||
["ayu-light"] = {
|
||||
nvim = "ayu-light",
|
||||
wezterm = "Ayu Light (Gogh)",
|
||||
ghostty = "Ayu Light",
|
||||
family = "ayu",
|
||||
variant = "light",
|
||||
description = "Ayu (light variant)",
|
||||
},
|
||||
}
|
||||
|
||||
-- ============================================================================
|
||||
-- Helper Functions
|
||||
-- ============================================================================
|
||||
|
||||
--- Get the terminal theme name for a given Neovim colorscheme
|
||||
--- @param nvim_name string The Neovim colorscheme name
|
||||
--- @param terminal_type string The terminal type ("wezterm" or "ghostty")
|
||||
--- @return string|nil The terminal theme name, or nil if not found
|
||||
function M.get_theme(nvim_name, terminal_type)
|
||||
local theme = M.themes[nvim_name]
|
||||
if not theme then
|
||||
return nil
|
||||
end
|
||||
|
||||
if terminal_type == "wezterm" then
|
||||
return theme.wezterm
|
||||
elseif terminal_type == "ghostty" then
|
||||
return theme.ghostty
|
||||
end
|
||||
|
||||
return nil
|
||||
end
|
||||
|
||||
--- Check if a Neovim colorscheme is supported for a given terminal
|
||||
--- @param nvim_name string The Neovim colorscheme name
|
||||
--- @param terminal_type string The terminal type ("wezterm" or "ghostty")
|
||||
--- @return boolean True if the mapping exists
|
||||
function M.is_supported(nvim_name, terminal_type)
|
||||
return M.get_theme(nvim_name, terminal_type) ~= nil
|
||||
end
|
||||
|
||||
--- Get all Neovim themes in the registry
|
||||
--- @return table List of Neovim colorscheme names
|
||||
function M.get_all_nvim_themes()
|
||||
local themes = {}
|
||||
for nvim_name, _ in pairs(M.themes) do
|
||||
table.insert(themes, nvim_name)
|
||||
end
|
||||
table.sort(themes)
|
||||
return themes
|
||||
end
|
||||
|
||||
--- Get theme family and variant information
|
||||
--- @param nvim_name string The Neovim colorscheme name
|
||||
--- @return table|nil Theme metadata (family, variant, description)
|
||||
function M.get_theme_info(nvim_name)
|
||||
local theme = M.themes[nvim_name]
|
||||
if not theme then
|
||||
return nil
|
||||
end
|
||||
|
||||
return {
|
||||
family = theme.family,
|
||||
variant = theme.variant,
|
||||
description = theme.description,
|
||||
wezterm = theme.wezterm,
|
||||
ghostty = theme.ghostty,
|
||||
}
|
||||
end
|
||||
|
||||
--- Get all themes in a family
|
||||
--- @param family_name string The theme family name (e.g., "tokyonight", "catppuccin")
|
||||
--- @return table List of theme entries in the family
|
||||
function M.get_family_themes(family_name)
|
||||
local family_themes = {}
|
||||
for nvim_name, theme in pairs(M.themes) do
|
||||
if theme.family == family_name then
|
||||
table.insert(family_themes, {
|
||||
nvim = nvim_name,
|
||||
variant = theme.variant,
|
||||
description = theme.description,
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
-- Sort by variant name
|
||||
table.sort(family_themes, function(a, b)
|
||||
return a.variant < b.variant
|
||||
end)
|
||||
|
||||
return family_themes
|
||||
end
|
||||
|
||||
--- Get a list of all theme families
|
||||
--- @return table List of unique family names
|
||||
function M.get_all_families()
|
||||
local families = {}
|
||||
local seen = {}
|
||||
|
||||
for _, theme in pairs(M.themes) do
|
||||
if not seen[theme.family] then
|
||||
seen[theme.family] = true
|
||||
table.insert(families, theme.family)
|
||||
end
|
||||
end
|
||||
|
||||
table.sort(families)
|
||||
return families
|
||||
end
|
||||
|
||||
--- Get statistics about the theme registry
|
||||
--- @return table Statistics (total_themes, families_count, terminal_coverage)
|
||||
function M.get_stats()
|
||||
local total = 0
|
||||
local wezterm_count = 0
|
||||
local ghostty_count = 0
|
||||
local families = {}
|
||||
|
||||
for _, theme in pairs(M.themes) do
|
||||
total = total + 1
|
||||
if theme.wezterm then
|
||||
wezterm_count = wezterm_count + 1
|
||||
end
|
||||
if theme.ghostty then
|
||||
ghostty_count = ghostty_count + 1
|
||||
end
|
||||
families[theme.family] = true
|
||||
end
|
||||
|
||||
local families_count = 0
|
||||
for _ in pairs(families) do
|
||||
families_count = families_count + 1
|
||||
end
|
||||
|
||||
return {
|
||||
total_themes = total,
|
||||
families_count = families_count,
|
||||
wezterm_coverage = wezterm_count,
|
||||
ghostty_coverage = ghostty_count,
|
||||
}
|
||||
end
|
||||
|
||||
return M
|
||||
Reference in New Issue
Block a user