220 lines
7.5 KiB
Lua
220 lines
7.5 KiB
Lua
-- ~/.config/nvim/colors/sweet.lua
|
|
-- Sweet colorscheme for Neovim
|
|
-- Based on the Sweet GTK theme colors
|
|
|
|
-- Reset colors
|
|
vim.cmd("highlight clear")
|
|
if vim.fn.exists("syntax_on") then
|
|
vim.cmd("syntax reset")
|
|
end
|
|
|
|
vim.o.termguicolors = true
|
|
vim.g.colors_name = "sweet"
|
|
|
|
-- Sweet GTK Theme Colors (from actual source code)
|
|
local colors = {
|
|
-- Core colors
|
|
bg = "#161925", -- Sweet background
|
|
fg = "#C3C7D1", -- Sweet foreground
|
|
bg_dark = "#121520", -- Darker background
|
|
bg_light = "#1a1f2e", -- Lighter background
|
|
bg_sidebar = "#222e39", -- Panel background
|
|
|
|
-- Sweet Primary Colors
|
|
lime = "#71f79f", -- Sweet lime
|
|
red = "#ed254e", -- Sweet red
|
|
orange = "#ff6a00", -- Sweet orange
|
|
yellow = "#f9dc5c", -- Sweet yellow
|
|
purple = "#c74ded", -- Sweet purple
|
|
dark_purple = "#7b7bbd", -- Sweet dark purple
|
|
blue = "#7cb7ff", -- Sweet blue
|
|
cyan = "#00c1e4", -- Sweet cyan
|
|
teal = "#00e8c6", -- Sweet teal
|
|
|
|
-- Sweet UI Colors
|
|
selected_bg = "#00D3A7", -- Sweet selected background
|
|
selected_fg = "#fefefe", -- Sweet selected foreground
|
|
|
|
-- Derived colors
|
|
comment = "#6c7086", -- Muted text
|
|
line_number = "#585b70", -- Line numbers
|
|
cursor_line = "#1e1e2e", -- Current line highlight
|
|
visual = "#313244", -- Visual selection
|
|
search = "#45475a", -- Search highlight
|
|
|
|
-- Status colors
|
|
error = "#ed254e", -- Error (Sweet red)
|
|
warning = "#f9dc5c", -- Warning (Sweet yellow)
|
|
info = "#7cb7ff", -- Info (Sweet blue)
|
|
hint = "#00e8c6", -- Hint (Sweet teal)
|
|
success = "#71f79f", -- Success (Sweet lime)
|
|
}
|
|
|
|
-- Helper function to set highlight groups
|
|
local function hl(group, opts)
|
|
vim.api.nvim_set_hl(0, group, opts)
|
|
end
|
|
|
|
-- Editor highlights
|
|
hl("Normal", { fg = colors.fg, bg = colors.bg })
|
|
hl("NormalFloat", { fg = colors.fg, bg = colors.bg_light })
|
|
hl("CursorLine", { bg = colors.cursor_line })
|
|
hl("CursorColumn", { bg = colors.cursor_line })
|
|
hl("ColorColumn", { bg = colors.bg_light })
|
|
hl("LineNr", { fg = colors.line_number })
|
|
hl("CursorLineNr", { fg = colors.yellow, bold = true })
|
|
hl("SignColumn", { fg = colors.line_number, bg = colors.bg })
|
|
hl("Folded", { fg = colors.comment, bg = colors.bg_light })
|
|
hl("FoldColumn", { fg = colors.comment, bg = colors.bg })
|
|
|
|
-- Search and selection
|
|
hl("Visual", { bg = colors.visual })
|
|
hl("VisualNOS", { bg = colors.visual })
|
|
hl("Search", { bg = colors.search, fg = colors.yellow })
|
|
hl("IncSearch", { bg = colors.yellow, fg = colors.bg })
|
|
hl("CurSearch", { bg = colors.orange, fg = colors.bg })
|
|
|
|
-- UI elements
|
|
hl("Pmenu", { fg = colors.fg, bg = colors.bg_light })
|
|
hl("PmenuSel", { fg = colors.selected_fg, bg = colors.selected_bg })
|
|
hl("PmenuSbar", { bg = colors.bg_sidebar })
|
|
hl("PmenuThumb", { bg = colors.purple })
|
|
hl("StatusLine", { fg = colors.fg, bg = colors.bg_sidebar })
|
|
hl("StatusLineNC", { fg = colors.comment, bg = colors.bg_light })
|
|
hl("TabLine", { fg = colors.comment, bg = colors.bg_light })
|
|
hl("TabLineFill", { bg = colors.bg_light })
|
|
hl("TabLineSel", { fg = colors.fg, bg = colors.bg })
|
|
hl("WinSeparator", { fg = colors.bg_light })
|
|
hl("VertSplit", { fg = colors.bg_light })
|
|
|
|
-- Syntax highlighting
|
|
hl("Comment", { fg = colors.comment, italic = true })
|
|
hl("Constant", { fg = colors.orange })
|
|
hl("String", { fg = colors.lime })
|
|
hl("Character", { fg = colors.lime })
|
|
hl("Number", { fg = colors.purple })
|
|
hl("Boolean", { fg = colors.purple })
|
|
hl("Float", { fg = colors.purple })
|
|
|
|
hl("Identifier", { fg = colors.cyan })
|
|
hl("Function", { fg = colors.blue })
|
|
|
|
hl("Statement", { fg = colors.red })
|
|
hl("Conditional", { fg = colors.red })
|
|
hl("Repeat", { fg = colors.red })
|
|
hl("Label", { fg = colors.red })
|
|
hl("Operator", { fg = colors.teal })
|
|
hl("Keyword", { fg = colors.red })
|
|
hl("Exception", { fg = colors.red })
|
|
|
|
hl("PreProc", { fg = colors.yellow })
|
|
hl("Include", { fg = colors.yellow })
|
|
hl("Define", { fg = colors.yellow })
|
|
hl("Macro", { fg = colors.yellow })
|
|
hl("PreCondit", { fg = colors.yellow })
|
|
|
|
hl("Type", { fg = colors.teal })
|
|
hl("StorageClass", { fg = colors.teal })
|
|
hl("Structure", { fg = colors.teal })
|
|
hl("Typedef", { fg = colors.teal })
|
|
|
|
hl("Special", { fg = colors.purple })
|
|
hl("SpecialChar", { fg = colors.purple })
|
|
hl("Tag", { fg = colors.cyan })
|
|
hl("Delimiter", { fg = colors.fg })
|
|
hl("SpecialComment", { fg = colors.comment, italic = true })
|
|
hl("Debug", { fg = colors.red })
|
|
|
|
-- Diagnostics
|
|
hl("DiagnosticError", { fg = colors.error })
|
|
hl("DiagnosticWarn", { fg = colors.warning })
|
|
hl("DiagnosticInfo", { fg = colors.info })
|
|
hl("DiagnosticHint", { fg = colors.hint })
|
|
hl("DiagnosticUnderlineError", { undercurl = true, sp = colors.error })
|
|
hl("DiagnosticUnderlineWarn", { undercurl = true, sp = colors.warning })
|
|
hl("DiagnosticUnderlineInfo", { undercurl = true, sp = colors.info })
|
|
hl("DiagnosticUnderlineHint", { undercurl = true, sp = colors.hint })
|
|
|
|
-- Git signs
|
|
hl("GitSignsAdd", { fg = colors.success })
|
|
hl("GitSignsChange", { fg = colors.warning })
|
|
hl("GitSignsDelete", { fg = colors.error })
|
|
|
|
-- Tree-sitter highlights
|
|
hl("@variable", { fg = colors.fg })
|
|
hl("@variable.builtin", { fg = colors.purple })
|
|
hl("@variable.parameter", { fg = colors.orange })
|
|
hl("@variable.member", { fg = colors.cyan })
|
|
|
|
hl("@constant", { fg = colors.orange })
|
|
hl("@constant.builtin", { fg = colors.purple })
|
|
hl("@constant.macro", { fg = colors.yellow })
|
|
|
|
hl("@string", { fg = colors.lime })
|
|
hl("@string.escape", { fg = colors.purple })
|
|
hl("@string.special", { fg = colors.purple })
|
|
|
|
hl("@character", { fg = colors.lime })
|
|
hl("@number", { fg = colors.purple })
|
|
hl("@boolean", { fg = colors.purple })
|
|
hl("@float", { fg = colors.purple })
|
|
|
|
hl("@function", { fg = colors.blue })
|
|
hl("@function.builtin", { fg = colors.cyan })
|
|
hl("@function.call", { fg = colors.blue })
|
|
hl("@function.macro", { fg = colors.yellow })
|
|
|
|
hl("@method", { fg = colors.blue })
|
|
hl("@method.call", { fg = colors.blue })
|
|
|
|
hl("@constructor", { fg = colors.teal })
|
|
hl("@parameter", { fg = colors.orange })
|
|
|
|
hl("@keyword", { fg = colors.red })
|
|
hl("@keyword.function", { fg = colors.red })
|
|
hl("@keyword.operator", { fg = colors.red })
|
|
hl("@keyword.return", { fg = colors.red })
|
|
hl("@keyword.conditional", { fg = colors.red })
|
|
hl("@keyword.repeat", { fg = colors.red })
|
|
hl("@keyword.import", { fg = colors.yellow })
|
|
|
|
hl("@operator", { fg = colors.teal })
|
|
|
|
hl("@type", { fg = colors.teal })
|
|
hl("@type.builtin", { fg = colors.purple })
|
|
hl("@type.definition", { fg = colors.teal })
|
|
|
|
hl("@property", { fg = colors.cyan })
|
|
hl("@field", { fg = colors.cyan })
|
|
|
|
hl("@tag", { fg = colors.red })
|
|
hl("@tag.attribute", { fg = colors.orange })
|
|
hl("@tag.delimiter", { fg = colors.fg })
|
|
|
|
hl("@comment", { fg = colors.comment, italic = true })
|
|
hl("@comment.todo", { fg = colors.yellow, bold = true })
|
|
hl("@comment.warning", { fg = colors.warning, bold = true })
|
|
hl("@comment.note", { fg = colors.info, bold = true })
|
|
hl("@comment.error", { fg = colors.error, bold = true })
|
|
|
|
-- Error and warning
|
|
hl("Error", { fg = colors.error })
|
|
hl("ErrorMsg", { fg = colors.error })
|
|
hl("WarningMsg", { fg = colors.warning })
|
|
hl("Title", { fg = colors.purple, bold = true })
|
|
hl("Directory", { fg = colors.blue })
|
|
hl("MoreMsg", { fg = colors.lime })
|
|
hl("Question", { fg = colors.cyan })
|
|
|
|
-- Diff
|
|
hl("DiffAdd", { bg = "#2a3a2d" })
|
|
hl("DiffChange", { bg = "#3a3a2d" })
|
|
hl("DiffDelete", { bg = "#3a2a2d" })
|
|
hl("DiffText", { bg = "#4a4a3d" })
|
|
|
|
-- Spell
|
|
hl("SpellBad", { undercurl = true, sp = colors.error })
|
|
hl("SpellCap", { undercurl = true, sp = colors.warning })
|
|
hl("SpellLocal", { undercurl = true, sp = colors.info })
|
|
hl("SpellRare", { undercurl = true, sp = colors.hint })
|