fix: incorporated the best of both analyses from cluade and gemini

This commit is contained in:
Brian Pooe 2025-09-27 13:12:57 +02:00
parent 30b6e1bdec
commit a8f406e10d

View file

@ -1,382 +1,400 @@
-- darcula-solid.nvim -- darcula-solid.nvim
-- A Neovim theme inspired by the JetBrains Darcula theme. -- A high-fidelity port of the JetBrains Darcula theme for Neovim
-- Author: brianpooe -- Author: brianpooe
-- License: MIT -- License: MIT
-- Updated based on canonical JetBrains Darcula specification.
local lush = require("lush") local lush = require("lush")
local hsl = lush.hsl local hsl = lush.hsl
-- The Canonical JetBrains Darcula Color Palette -- The canonical JetBrains Darcula color palette
-- Sourced from the official Darcula Look and Feel implementation. -- Based on analysis of github.com/bulenkov/Darcula (official implementation)
-- and validated against doums/darcula and rokoroku/vscode-theme-darcula
local p = { local p = {
-- Editor and UI Colors -- Core Editor Colors (from official sources)
editor_bg = hsl("#2B2B2B"), -- The primary background color of the code editor pane. bg = hsl("#2B2B2B"), -- Editor background
ui_bg = hsl("#3C3F41"), -- Background for UI elements like sidebars, status bars, and tool windows. bg_light = hsl("#3C3F41"), -- UI elements (sidebars, status bars, tool windows)
gutter_bg = hsl("#313335"), -- Background for the editor gutter where line numbers are displayed. bg_gutter = hsl("#313335"), -- Gutter background
current_line_bg = hsl("#323232"), -- A slightly lighter shade for the current line background. bg_darker = hsl("#242424"), -- Darker background for contrast
selection_bg = hsl("#214283"), -- The background color for selected text. bg_current_line = hsl("#323232"), -- Current line highlight
search_result_bg = hsl("#32593D"), -- Background color for the primary search result.
other_search_results_bg = hsl("#4D4D2F"), -- Background for other occurrences of a search term. -- Selection and Search
bg_visual = hsl("#214283"), -- Selection background (deep desaturated blue)
-- Foreground Colors bg_search = hsl("#32593D"), -- Primary search result
fg = hsl("#A9B7C6"), -- The default color for plain text, parameters, and general code. bg_search_other = hsl("#4D4D2F"), -- Other search occurrences
gutter_fg = hsl("#606366"), -- The color of line numbers in the gutter.
comment = hsl("#808080"), -- Used for all code comments (line and block). -- Text Colors
white = hsl("#FFFFFF"), -- Pure white for high contrast text on dark selections. fg = hsl("#A9B7C6"), -- Default foreground (parameters, plain text)
fg_dark = hsl("#606366"), -- Gutter numbers, inactive elements
-- Syntax Colors fg_comment = hsl("#808080"), -- Comments
keyword = hsl("#CC7832"), -- Keywords (if, for, return), storage classes (static, const). fg_light = hsl("#BBBBBB"), -- Lighter text
string = hsl("#6A8759"), -- All string literals and character constants.
number = hsl("#6897BB"), -- Integer, float, and other numeric constants. -- Syntax Colors (from canonical Darcula)
function_call = hsl("#FFC66D"), -- The color used for function and method invocations. keyword = hsl("#CC7832"), -- Keywords (if, for, return), storage classes
annotation = hsl("#BBB529"), -- Annotations (Java), decorators (Python), attributes (Rust). string = hsl("#6A8759"), -- String literals (darker green per JetBrains)
constant = hsl("#9876AA"), -- Named constants, enumeration members. string_escape = hsl("#CC7832"), -- Escape sequences use keyword color
member_variable = hsl("#9876AA"), -- Instance or class-level variables and properties. Often italicized. number = hsl("#6897BB"), -- Numeric constants
-- Diagnostic Colors -- Function/Method Colors
error = hsl("#BC3F3C"), -- Color for error text and squiggly underlines. function_call = hsl("#FFC66D"), -- Function and method invocations
warning = hsl("#BE9117"), -- Color for warning text and squiggly underlines. annotation = hsl("#BBB529"), -- Annotations, decorators, attributes
info = hsl("#525A52"), -- Color for informational diagnostic underlines.
error_bg = hsl("#562B2C"), -- A subtle background for error text. -- Variable/Constant Colors
warning_bg = hsl("#554825"), -- A subtle background for warning text. constant = hsl("#9876AA"), -- Named constants, enum members
info_bg = hsl("#354736"), -- A subtle background for info text. member_variable = hsl("#9876AA"), -- Instance/class variables (often italicized)
-- Diff Colors -- Diagnostic Colors (from JetBrains spec)
diff_add = hsl("#4A8F4A"), -- Background color for added lines in a diff view. error = hsl("#BC3F3C"), -- Error text and underlines
diff_mod = hsl("#385570"), -- Background color for modified lines in a diff view. warning = hsl("#BE9117"), -- Warning text and underlines
diff_del = hsl("#632F34"), -- Background color for deleted lines in a diff view. info = hsl("#525A52"), -- Informational diagnostics
diff_text_bg = hsl("#4A6E8E"), -- Background for specific changed text within a modified line. hint = hsl("#499C54"), -- Success/hint green
diff_text = hsl("#A9B7C6"), -- Text color for diffs, typically the default foreground.
-- Diff/VCS Colors
-- UI Border diff_add = hsl("#4A8F4A"), -- Added lines background
border = hsl("#515658"), -- A slightly lighter border for active UI elements. diff_modified = hsl("#385570"), -- Modified lines background
diff_delete = hsl("#632F34"), -- Deleted lines background
-- Additional UI Colors
border = hsl("#616161"), -- UI borders
border_dark = hsl("#424242"), -- Darker border variant
gray = hsl("#606060"), -- Various UI elements
gray_light = hsl("#767676"), -- Lighter gray
-- Special Colors
white = hsl("#FFFFFF"),
blue = hsl("#287BDE"), -- Links, special blues
cyan_bright = hsl("#5394EC"), -- Info, links
pink = hsl("#CB77B4"), -- Tags, special syntax
} }
-- Terminal colors for integrated terminal, aligned with the Darcula palette -- Terminal colors matching JetBrains terminal
vim.g.terminal_color_0 = "#2B2B2B" -- black (editor_bg) vim.g.terminal_color_0 = "#2B2B2B" -- black
vim.g.terminal_color_1 = "#BC3F3C" -- red (error) vim.g.terminal_color_1 = "#BC3F3C" -- red (using error color)
vim.g.terminal_color_2 = "#6A8759" -- green (string) vim.g.terminal_color_2 = "#4A8F4A" -- green (using diff add)
vim.g.terminal_color_3 = "#FFC66D" -- yellow (function_call) vim.g.terminal_color_3 = "#BE9117" -- yellow (using warning)
vim.g.terminal_color_4 = "#6897BB" -- blue (number) vim.g.terminal_color_4 = "#6897BB" -- blue (using number color)
vim.g.terminal_color_5 = "#9876AA" -- magenta (constant) vim.g.terminal_color_5 = "#9876AA" -- magenta (using constant)
vim.g.terminal_color_6 = "#6897BB" -- cyan (number) vim.g.terminal_color_6 = "#5394EC" -- cyan
vim.g.terminal_color_7 = "#A9B7C6" -- white (fg) vim.g.terminal_color_7 = "#A9B7C6" -- white
vim.g.terminal_color_8 = "#606366" -- bright black (gutter_fg) vim.g.terminal_color_8 = "#606366" -- bright black
vim.g.terminal_color_9 = "#CC7832" -- bright red (keyword) vim.g.terminal_color_9 = "#FF6B68" -- bright red
vim.g.terminal_color_10 = "#A9B7C6" -- bright green (fg) vim.g.terminal_color_10 = "#A8C023" -- bright green
vim.g.terminal_color_11 = "#BBB529" -- bright yellow (annotation) vim.g.terminal_color_11 = "#FFC66D" -- bright yellow
vim.g.terminal_color_12 = "#A9B7C6" -- bright blue (fg) vim.g.terminal_color_12 = "#6FB3D2" -- bright blue
vim.g.terminal_color_13 = "#9876AA" -- bright magenta (constant) vim.g.terminal_color_13 = "#D197D9" -- bright magenta
vim.g.terminal_color_14 = "#6897BB" -- bright cyan (number) vim.g.terminal_color_14 = "#4DD0E1" -- bright cyan
vim.g.terminal_color_15 = "#FFFFFF" -- bright white (white) vim.g.terminal_color_15 = "#FFFFFF" -- bright white
-- The theme definition using lush.nvim ---@diagnostic disable: undefined-global
return lush(function() return lush(function()
return { return {
-- == Neovim UI Groups == -- -- == Core Neovim UI Groups == --
Normal({ bg = p.editor_bg, fg = p.fg }), Normal { bg = p.bg, fg = p.fg },
NormalNC({ bg = p.editor_bg, fg = p.fg }), -- Non-current windows NormalNC { bg = p.bg, fg = p.fg }, -- Non-current windows
NormalFloat({ bg = p.ui_bg, fg = p.fg }), -- Floating windows NormalFloat { bg = p.bg_light, fg = p.fg }, -- Floating windows (LSP hover, etc.)
FloatBorder({ bg = p.ui_bg, fg = p.border }), FloatBorder { bg = p.bg_light, fg = p.border },
SignColumn({ bg = p.gutter_bg, fg = p.gutter_fg }),
LineNr({ bg = p.gutter_bg, fg = p.gutter_fg }), -- Line Numbers and Signs
CursorLineNr({ bg = p.gutter_bg, fg = p.fg, style = "bold" }), SignColumn { bg = p.bg, fg = p.fg_dark },
CursorLine({ bg = p.current_line_bg }), LineNr { bg = p.bg_gutter, fg = p.fg_dark },
CursorColumn({ bg = p.current_line_bg }), CursorLineNr { bg = p.bg_gutter, fg = p.fg, gui = "bold" },
ColorColumn({ bg = p.current_line_bg }),
-- Cursor and Current Line
Visual({ bg = p.selection_bg }), CursorLine { bg = p.bg_current_line },
VisualNOS({ bg = p.selection_bg }), CursorColumn { bg = p.bg_current_line },
ColorColumn { bg = p.bg_light },
Pmenu({ bg = p.ui_bg, fg = p.fg }),
PmenuSel({ bg = p.selection_bg, fg = p.white }), -- Visual Selection
PmenuSbar({ bg = p.ui_bg }), Visual { bg = p.bg_visual },
PmenuThumb({ bg = p.gutter_fg }), VisualNOS { bg = p.bg_visual },
StatusLine({ bg = p.ui_bg, fg = p.fg, style = "NONE" }), -- Popup Menu
StatusLineNC({ bg = p.gutter_bg, fg = p.gutter_fg }), Pmenu { bg = p.bg_light, fg = p.fg },
TabLine({ bg = p.gutter_bg, fg = p.gutter_fg }), PmenuSel { bg = p.bg_visual, fg = p.fg },
TabLineFill({ bg = p.gutter_bg }), PmenuSbar { bg = p.bg_light },
TabLineSel({ bg = p.ui_bg, fg = p.white }), PmenuThumb { bg = p.fg_dark },
VertSplit({ fg = p.gutter_fg, bg = p.editor_bg }), -- Status and Tab Lines
WinSeparator({ fg = p.gutter_fg, bg = p.editor_bg }), StatusLine { bg = p.bg_light, fg = p.fg },
StatusLineNC { bg = p.bg_light, fg = p.fg_dark },
Search({ bg = p.search_result_bg, fg = p.white }), TabLine { bg = p.bg_gutter, fg = p.fg_dark },
IncSearch({ bg = p.other_search_results_bg, fg = p.white }), TabLineFill { bg = p.bg_gutter },
CurSearch({ link = "IncSearch" }), TabLineSel { bg = p.bg_light, fg = p.fg, gui = "bold" },
Substitute({ bg = p.warning, fg = p.editor_bg }),
-- Window Separators
Title({ fg = p.function_call, style = "bold" }), VertSplit { fg = p.fg_dark, bg = p.bg },
Directory({ fg = p.number }), WinSeparator { fg = p.fg_dark, bg = p.bg },
ErrorMsg({ fg = p.error }),
WarningMsg({ fg = p.warning }), -- Search
MoreMsg({ fg = p.string }), Search { bg = p.bg_search },
Question({ fg = p.number }), IncSearch { bg = p.bg_search_other },
ModeMsg({ fg = p.fg, style = "bold" }), CurSearch { bg = p.bg_search },
Conceal({ fg = p.gutter_fg, bg = p.editor_bg }), Substitute { bg = p.warning, fg = p.bg },
Folded({ fg = p.comment, bg = p.editor_bg }),
FoldColumn({ bg = p.gutter_bg, fg = p.gutter_fg }), -- Messages and UI Elements
Title { fg = p.keyword, gui = "bold" },
MatchParen({ bg = p.selection_bg, fg = p.function_call, style = "bold" }), Directory { fg = p.number },
NonText({ fg = p.gutter_fg }), ErrorMsg { fg = p.error },
SpecialKey({ fg = p.gutter_fg }), WarningMsg { fg = p.warning },
Whitespace({ fg = p.gutter_fg }), MoreMsg { fg = p.string },
EndOfBuffer({ fg = p.editor_bg }), Question { fg = p.number },
ModeMsg { fg = p.fg },
-- Spell checking Conceal { fg = p.fg_dark, bg = p.bg },
SpellBad({ sp = p.error, style = "undercurl" }), Folded { fg = p.fg_comment, bg = p.bg_darker },
SpellCap({ sp = p.warning, style = "undercurl" }), FoldColumn { bg = p.bg_gutter, fg = p.fg_dark },
SpellLocal({ sp = p.number, style = "undercurl" }),
SpellRare({ sp = p.constant, style = "undercurl" }), -- Matching
MatchParen { bg = p.gray, fg = p.function_call },
-- == Standard Syntax Groups (Fallback for no Tree-sitter) == --
Comment({ fg = p.comment, style = "italic" }), -- Special Characters
String({ fg = p.string }), NonText { fg = p.fg_dark },
Number({ fg = p.number }), SpecialKey { fg = p.gray },
Constant({ fg = p.constant }), Whitespace { fg = p.gray },
Character({ fg = p.string }), EndOfBuffer { fg = p.bg },
Boolean({ fg = p.keyword }),
-- Spell Checking
Keyword({ fg = p.keyword }), SpellBad { sp = p.error, gui = "undercurl" },
Statement({ fg = p.keyword }), SpellCap { sp = p.warning, gui = "undercurl" },
Operator({ fg = p.fg }), SpellLocal { sp = p.info, gui = "undercurl" },
Conditional({ fg = p.keyword }), SpellRare { sp = p.constant, gui = "undercurl" },
Repeat({ fg = p.keyword }),
-- == Legacy Syntax Groups (Fallback when Tree-sitter is disabled) == --
Identifier({ fg = p.fg }), Comment { fg = p.fg_comment, gui = "italic" },
Function({ fg = p.function_call }), String { fg = p.string },
Type({ fg = p.fg }), Character { fg = p.string },
StorageClass({ fg = p.keyword }), Number { fg = p.number },
Structure({ fg = p.keyword }), Float { fg = p.number },
Typedef({ fg = p.keyword }), Boolean { fg = p.keyword, gui = "italic" },
PreProc({ fg = p.keyword }),
Include({ fg = p.keyword }), Keyword { fg = p.keyword, gui = "bold" },
Define({ fg = p.keyword }), Conditional { fg = p.keyword, gui = "bold" },
Macro({ fg = p.annotation }), Repeat { fg = p.keyword, gui = "bold" },
Statement { fg = p.keyword, gui = "bold" },
Special({ fg = p.constant }), Operator { fg = p.fg },
SpecialChar({ fg = p.constant }), Exception { fg = p.keyword, gui = "bold" },
SpecialComment({ fg = p.comment, style = "italic" }),
Todo({ bg = p.ui_bg, fg = p.string, style = "bold" }), Identifier { fg = p.fg },
Underlined({ fg = p.number, style = "underline" }), Function { fg = p.function_call },
Error({ fg = p.error }),
Type { fg = p.fg },
-- == Complete Tree-sitter Highlight Groups (Aligned with JetBrains Darcula) == -- StorageClass { fg = p.keyword },
Structure { fg = p.keyword },
Typedef { fg = p.keyword },
Constant { fg = p.constant },
PreProc { fg = p.keyword },
Include { fg = p.keyword },
Define { fg = p.keyword },
Macro { fg = p.annotation },
PreCondit { fg = p.keyword },
Special { fg = p.fg },
SpecialChar { fg = p.keyword },
Tag { fg = p.fg },
Delimiter { fg = p.fg },
SpecialComment { fg = p.gray_light, gui = "italic" },
Debug { fg = p.pink },
Todo { fg = p.annotation, bg = p.bg_darker, gui = "bold" },
Error { fg = p.error },
Underlined { fg = p.blue, gui = "underline" },
-- == Tree-sitter Highlight Groups == --
-- Keywords and Control Flow
["@keyword"] = { fg = p.keyword, gui = "bold" },
["@keyword.function"] = { fg = p.keyword, gui = "bold" },
["@keyword.operator"] = { fg = p.keyword, gui = "bold" },
["@keyword.return"] = { fg = p.keyword, gui = "bold" },
["@conditional"] = { fg = p.keyword, gui = "bold" },
["@repeat"] = { fg = p.keyword, gui = "bold" },
["@exception"] = { fg = p.keyword, gui = "bold" },
["@include"] = { fg = p.keyword, gui = "bold" },
-- Comments -- Comments
["@comment"] = { fg = p.comment, style = "italic" }, ["@comment"] = { fg = p.fg_comment, gui = "italic" },
["@comment.documentation"] = { fg = p.comment, style = "italic" }, ["@comment.documentation"] = { fg = p.fg_comment, gui = "italic" },
["@comment.todo"] = { fg = p.string, bg = p.ui_bg, style = "bold" }, ["@comment.todo"] = { fg = p.annotation, bg = p.bg_darker, gui = "bold" },
["@comment.warning"] = { fg = p.warning, bg = p.warning_bg, style = "bold" }, ["@comment.warning"] = { fg = p.warning, gui = "bold" },
["@comment.error"] = { fg = p.error, bg = p.error_bg, style = "bold" }, ["@comment.error"] = { fg = p.error, gui = "bold" },
["@comment.note"] = { fg = p.number, bg = p.info_bg, style = "bold" },
-- Strings -- Strings
["@string"] = { fg = p.string }, ["@string"] = { fg = p.string },
["@string.documentation"] = { fg = p.string, style = "italic" }, ["@string.documentation"] = { fg = p.string, gui = "italic" },
["@string.regex"] = { fg = p.constant }, ["@string.regex"] = { fg = p.string },
["@string.escape"] = { fg = p.keyword }, ["@string.escape"] = { fg = p.keyword }, -- Escape sequences use keyword color
["@string.special"] = { fg = p.constant }, ["@string.special"] = { fg = p.keyword },
["@character"] = { fg = p.string }, ["@character"] = { fg = p.string },
["@character.special"] = { fg = p.constant }, ["@character.special"] = { fg = p.keyword },
-- Numbers and Booleans -- Numbers and Booleans
["@number"] = { fg = p.number }, ["@number"] = { fg = p.number },
["@boolean"] = { fg = p.keyword },
["@float"] = { fg = p.number }, ["@float"] = { fg = p.number },
["@boolean"] = { fg = p.keyword, gui = "italic" },
-- Functions and Methods -- Functions and Methods
["@function"] = { fg = p.fg }, -- Definitions are default color ["@function"] = { fg = p.function_call },
["@function.builtin"] = { fg = p.function_call },
["@function.call"] = { fg = p.function_call }, ["@function.call"] = { fg = p.function_call },
["@function.macro"] = { fg = p.annotation }, ["@function.builtin"] = { fg = p.function_call },
["@method"] = { fg = p.fg }, -- Definitions are default color ["@function.macro"] = { fg = p.function_call },
["@method"] = { fg = p.function_call },
["@method.call"] = { fg = p.function_call }, ["@method.call"] = { fg = p.function_call },
["@constructor"] = { fg = p.function_call },
["@constructor"] = { fg = p.fg },
["@parameter"] = { fg = p.fg },
["@parameter.reference"] = { fg = p.fg, style = "italic" },
-- Keywords
["@keyword"] = { fg = p.keyword },
["@keyword.function"] = { fg = p.keyword },
["@keyword.operator"] = { fg = p.keyword },
["@keyword.return"] = { fg = p.keyword },
["@keyword.import"] = { fg = p.keyword },
["@keyword.storage"] = { fg = p.keyword },
["@keyword.directive"] = { fg = p.keyword },
["@keyword.directive.define"] = { fg = p.keyword },
["@conditional"] = { fg = p.keyword },
["@repeat"] = { fg = p.keyword },
["@label"] = { fg = p.annotation },
["@operator"] = { fg = p.fg },
["@exception"] = { fg = p.keyword },
-- Types -- Types
["@type"] = { fg = p.fg }, ["@type"] = { fg = p.fg }, -- Darcula uses default foreground for types
["@type.builtin"] = { fg = p.keyword }, ["@type.builtin"] = { fg = p.keyword }, -- Built-in types styled as keywords
["@type.qualifier"] = { fg = p.keyword }, ["@type.qualifier"] = { fg = p.keyword },
["@type.definition"] = { fg = p.fg }, ["@type.definition"] = { fg = p.fg },
["@storageclass"] = { fg = p.keyword }, ["@storageclass"] = { fg = p.keyword },
["@attribute"] = { fg = p.annotation }, ["@attribute"] = { fg = p.annotation },
["@field"] = { fg = p.member_variable, style = "italic" }, ["@field"] = { fg = p.member_variable },
["@property"] = { fg = p.member_variable, style = "italic" }, ["@property"] = { fg = p.member_variable },
-- Variables and Constants -- Variables and Parameters
["@variable"] = { fg = p.fg }, ["@variable"] = { fg = p.fg },
["@variable.builtin"] = { fg = p.constant, style = "italic" }, ["@variable.builtin"] = { fg = p.constant, gui = "italic" },
["@variable.parameter"] = { fg = p.fg }, ["@variable.parameter"] = { fg = p.fg },
["@variable.member"] = { fg = p.member_variable, style = "italic" }, ["@variable.member"] = { fg = p.member_variable, gui = "italic" },
-- Constants
["@constant"] = { fg = p.constant }, ["@constant"] = { fg = p.constant },
["@constant.builtin"] = { fg = p.constant }, ["@constant.builtin"] = { fg = p.constant },
["@constant.macro"] = { fg = p.constant }, ["@constant.macro"] = { fg = p.constant },
-- Namespaces and Includes -- Punctuation and Operators
["@module"] = { fg = p.fg },
["@namespace"] = { fg = p.fg },
["@symbol"] = { fg = p.fg },
["@annotation"] = { fg = p.annotation },
["@include"] = { fg = p.keyword },
["@preproc"] = { fg = p.keyword },
["@define"] = { fg = p.keyword },
["@macro"] = { fg = p.annotation },
-- Punctuation
["@punctuation.delimiter"] = { fg = p.fg }, ["@punctuation.delimiter"] = { fg = p.fg },
["@punctuation.bracket"] = { fg = p.fg }, ["@punctuation.bracket"] = { fg = p.fg },
["@punctuation.special"] = { fg = p.keyword }, ["@punctuation.special"] = { fg = p.fg },
["@operator"] = { fg = p.fg },
-- Markup (for markdown, etc.)
["@text.title"] = { fg = p.function_call, style = "bold" },
["@text.uri"] = { fg = p.string, style = "underline" },
["@text.literal"] = { fg = p.string },
["@text.strong"] = { style = "bold" },
["@text.emphasis"] = { style = "italic" },
["@text.strike"] = { style = "strikethrough" },
["@text.underline"] = { style = "underline" },
["@text.quote"] = { fg = p.comment, style = "italic" },
["@text.todo"] = { fg = p.string, bg = p.ui_bg, style = "bold" },
["@text.warning"] = { fg = p.warning, style = "bold" },
["@text.danger"] = { fg = p.error, style = "bold" },
["@text.note"] = { fg = p.number, style = "bold" },
-- Tags (HTML/XML) -- Tags (HTML/XML)
["@tag"] = { fg = p.fg }, ["@tag"] = { fg = p.fg },
["@tag.attribute"] = { fg = p.member_variable }, ["@tag.attribute"] = { fg = p.member_variable, gui = "italic" },
["@tag.delimiter"] = { fg = p.fg }, ["@tag.delimiter"] = { fg = p.fg },
-- Diff (Tree-sitter) -- Text/Markup (Markdown)
["@text.diff.add"] = { bg = p.diff_add }, ["@text"] = { fg = p.fg },
["@text.diff.delete"] = { bg = p.diff_del }, ["@text.strong"] = { gui = "bold" },
["@text.diff.change"] = { bg = p.diff_mod }, ["@text.emphasis"] = { gui = "italic" },
["@text.underline"] = { gui = "underline" },
["@text.strike"] = { gui = "strikethrough" },
["@text.title"] = { fg = p.function_call, gui = "bold" },
["@text.literal"] = { fg = p.string },
["@text.uri"] = { fg = p.string, gui = "underline" },
["@text.reference"] = { fg = p.number },
-- Namespaces and Modules
["@namespace"] = { fg = p.fg },
["@module"] = { fg = p.fg },
["@symbol"] = { fg = p.constant },
-- Labels
["@label"] = { fg = p.keyword },
-- == LSP Semantic Token Support == -- -- == LSP Semantic Token Support == --
["@lsp.type.class"] = { fg = p.fg }, ["@lsp.type.class"] = { fg = p.fg },
["@lsp.type.struct"] = { fg = p.fg }, ["@lsp.type.struct"] = { fg = p.fg },
["@lsp.type.enum"] = { fg = p.fg }, ["@lsp.type.enum"] = { fg = p.fg },
["@lsp.type.enumMember"] = { fg = p.constant }, ["@lsp.type.enumMember"] = { fg = p.constant },
["@lsp.type.interface"] = { fg = p.fg, style = "italic" }, ["@lsp.type.interface"] = { fg = p.fg },
["@lsp.type.typeParameter"] = { fg = p.fg }, ["@lsp.type.typeParameter"] = { fg = p.fg },
["@lsp.type.namespace"] = { fg = p.fg }, ["@lsp.type.namespace"] = { fg = p.fg },
["@lsp.type.parameter"] = { fg = p.fg }, ["@lsp.type.parameter"] = { fg = p.fg },
["@lsp.type.variable"] = { fg = p.fg }, ["@lsp.type.variable"] = { fg = p.fg },
["@lsp.type.property"] = { fg = p.member_variable, style = "italic" }, ["@lsp.type.property"] = { fg = p.member_variable },
["@lsp.type.function"] = { fg = p.fg }, ["@lsp.type.function"] = { fg = p.function_call },
["@lsp.type.method"] = { fg = p.function_call }, ["@lsp.type.method"] = { fg = p.function_call },
["@lsp.type.macro"] = { fg = p.annotation }, ["@lsp.type.macro"] = { fg = p.annotation },
["@lsp.type.keyword"] = { fg = p.keyword },
["@lsp.type.comment"] = { fg = p.comment, style = "italic" },
["@lsp.type.string"] = { fg = p.string },
["@lsp.type.number"] = { fg = p.number },
["@lsp.type.operator"] = { fg = p.fg },
["@lsp.type.decorator"] = { fg = p.annotation }, ["@lsp.type.decorator"] = { fg = p.annotation },
-- LSP Modifiers ["@lsp.mod.deprecated"] = { gui = "strikethrough" },
["@lsp.mod.deprecated"] = { style = "strikethrough" }, ["@lsp.mod.readonly"] = { gui = "italic" },
["@lsp.mod.static"] = { style = "italic" }, ["@lsp.mod.static"] = { gui = "italic" },
["@lsp.mod.async"] = { style = "italic" },
["@lsp.mod.readonly"] = { fg = p.constant },
-- == LSP Diagnostics == -- -- == LSP Diagnostics == --
DiagnosticError({ fg = p.error }), DiagnosticError { fg = p.error },
DiagnosticWarn({ fg = p.warning }), DiagnosticWarn { fg = p.warning },
DiagnosticInfo({ fg = p.fg }), DiagnosticInfo { fg = p.info },
DiagnosticHint({ fg = p.string }), DiagnosticHint { fg = p.hint },
DiagnosticVirtualTextError({ fg = p.error, bg = p.error_bg }), DiagnosticVirtualTextError { fg = p.error, bg = hsl("#3D2929") },
DiagnosticVirtualTextWarn({ fg = p.warning, bg = p.warning_bg }), DiagnosticVirtualTextWarn { fg = p.warning, bg = hsl("#3D3D29") },
DiagnosticVirtualTextInfo({ fg = p.fg, bg = p.info_bg }), DiagnosticVirtualTextInfo { fg = p.info, bg = hsl("#293D48") },
DiagnosticVirtualTextHint { fg = p.hint, bg = hsl("#294F33") },
DiagnosticUnderlineError({ sp = p.error, style = "undercurl" }),
DiagnosticUnderlineWarn({ sp = p.warning, style = "undercurl" }), DiagnosticUnderlineError { sp = p.error, gui = "undercurl" },
DiagnosticUnderlineInfo({ sp = p.info, style = "undercurl" }), DiagnosticUnderlineWarn { sp = p.warning, gui = "undercurl" },
DiagnosticUnderlineHint({ sp = p.string, style = "undercurl" }), DiagnosticUnderlineInfo { sp = p.info, gui = "undercurl" },
DiagnosticUnderlineHint { sp = p.hint, gui = "undercurl" },
DiagnosticSignError({ fg = p.error, bg = p.gutter_bg }),
DiagnosticSignWarn({ fg = p.warning, bg = p.gutter_bg }), DiagnosticFloatingError { fg = p.error, bg = p.bg_light },
DiagnosticSignInfo({ fg = p.number, bg = p.gutter_bg }), DiagnosticFloatingWarn { fg = p.warning, bg = p.bg_light },
DiagnosticSignHint({ fg = p.string, bg = p.gutter_bg }), DiagnosticFloatingInfo { fg = p.info, bg = p.bg_light },
DiagnosticFloatingHint { fg = p.hint, bg = p.bg_light },
-- Legacy LSP Diagnostics Links
LspDiagnosticsDefaultError({ link = "DiagnosticError" }), DiagnosticSignError { fg = p.error, bg = p.bg },
LspDiagnosticsDefaultWarning({ link = "DiagnosticWarn" }), DiagnosticSignWarn { fg = p.warning, bg = p.bg },
LspDiagnosticsDefaultInformation({ link = "DiagnosticInfo" }), DiagnosticSignInfo { fg = p.info, bg = p.bg },
LspDiagnosticsDefaultHint({ link = "DiagnosticHint" }), DiagnosticSignHint { fg = p.hint, bg = p.bg },
LspDiagnosticsUnderlineError({ link = "DiagnosticUnderlineError" }),
LspDiagnosticsUnderlineWarning({ link = "DiagnosticUnderlineWarn" }), -- LSP References
LspDiagnosticsUnderlineInformation({ link = "DiagnosticUnderlineInfo" }), LspReferenceText { bg = p.bg_darker },
LspDiagnosticsUnderlineHint({ link = "DiagnosticUnderlineHint" }), LspReferenceRead { bg = p.bg_darker },
LspReferenceWrite { bg = p.bg_darker, gui = "underline" },
-- LSP Code Lens
LspCodeLens { fg = p.gray_light },
LspCodeLensSeparator { fg = p.gray },
-- == Plugin Support == -- -- == Plugin Support == --
-- NvimTree -- NvimTree
NvimTreeNormal({ bg = p.editor_bg, fg = p.fg }), NvimTreeNormal { bg = p.bg, fg = p.fg },
NvimTreeVertSplit({ fg = p.gutter_fg, bg = p.editor_bg }), NvimTreeVertSplit { fg = p.border_dark, bg = p.bg },
NvimTreeRootFolder({ fg = p.function_call, style = "bold" }), NvimTreeEndOfBuffer { fg = p.bg },
NvimTreeFolderIcon({ fg = p.number }), NvimTreeFolderIcon { fg = p.number },
NvimTreeSymlink({ fg = p.number, style = "underline" }), NvimTreeFolderName { fg = p.fg },
NvimTreeGitDirty({ fg = p.warning }), NvimTreeOpenedFolderName { fg = p.number, gui = "bold" },
NvimTreeGitStaged({ fg = p.string }), NvimTreeEmptyFolderName { fg = p.fg_dark },
NvimTreeGitNew({ fg = p.string }), NvimTreeRootFolder { fg = p.keyword, gui = "bold" },
NvimTreeGitDeleted({ fg = p.error }), NvimTreeSpecialFile { fg = p.function_call, gui = "underline" },
NvimTreeGitDirty { fg = p.warning },
NvimTreeGitStaged { fg = p.hint },
NvimTreeGitNew { fg = p.hint },
NvimTreeGitDeleted { fg = p.error },
-- Telescope -- Telescope
TelescopeNormal({ bg = p.ui_bg, fg = p.fg }), TelescopeNormal { bg = p.bg_light, fg = p.fg },
TelescopeBorder({ fg = p.border, bg = p.ui_bg }), TelescopeBorder { fg = p.border, bg = p.bg_light },
TelescopePromptTitle({ fg = p.keyword, bg = p.ui_bg, style = "bold" }), TelescopePromptBorder { fg = p.border, bg = p.bg_light },
TelescopePreviewTitle({ fg = p.keyword, bg = p.editor_bg, style = "bold" }), TelescopePromptTitle { fg = p.keyword, bg = p.bg_light, gui = "bold" },
TelescopeSelection({ bg = p.selection_bg, fg = p.fg }), TelescopePromptPrefix { fg = p.keyword },
TelescopeMatching({ fg = p.function_call, style = "bold" }), TelescopeSelection { bg = p.bg_visual, fg = p.fg },
TelescopeSelectionCaret { fg = p.keyword, bg = p.bg_visual },
-- nvim-cmp TelescopeMatching { fg = p.function_call, gui = "bold" },
CmpItemAbbr({ fg = p.fg }),
CmpItemAbbrDeprecated({ fg = p.gutter_fg, style = "strikethrough" }), -- GitSigns
CmpItemAbbrMatch({ fg = p.function_call, style = "bold" }), GitSignsAdd { fg = p.hint },
CmpItemAbbrMatchFuzzy({ fg = p.function_call, style = "bold" }), GitSignsAddLn { bg = p.diff_add },
CmpItemKind({ fg = p.constant }), GitSignsChange { fg = p.warning },
CmpItemKindMethod({ fg = p.function_call }), GitSignsChangeLn { bg = p.diff_modified },
CmpItemKindFunction({ fg = p.function_call }), GitSignsDelete { fg = p.error },
CmpItemKindConstructor({ fg = p.annotation }), GitSignsDeleteLn { bg = p.diff_delete },
CmpItemKindField({ fg = p.member_variable }), GitSignsCurrentLineBlame { fg = p.fg_comment },
CmpItemKindProperty({ fg = p.member_variable }),
CmpItemKindKeyword({ fg = p.keyword }), -- Diff
CmpItemKindSnippet({ fg = p.string }), DiffAdd { bg = p.diff_add },
CmpItemKindConstant({ fg = p.constant }), DiffChange { bg = p.diff_modified },
CmpItemKindEnumMember({ fg = p.constant }), DiffDelete { bg = p.diff_delete },
DiffText { bg = p.warning, fg = p.bg },
-- GitSigns & Diff
GitSignsAdd({ fg = p.string }), -- Neogit
GitSignsChange({ fg = p.warning }), NeogitBranch { fg = p.constant },
GitSignsDelete({ fg = p.error }), NeogitRemote { fg = p.number },
GitSignsCurrentLineBlame({ fg = p.comment }), NeogitHunkHeader { bg = p.bg_light, fg = p.fg },
DiffAdd({ bg = p.diff_add }), NeogitHunkHeaderHighlight { bg = p.bg_visual, fg = p.keyword },
DiffChange({ bg = p.diff_mod }), NeogitDiffContextHighlight { bg = p.bg_current_line },
DiffDelete({ bg = p.diff_del }), NeogitDiffDeleteHighlight { bg = p.diff_delete },
DiffText({ bg = p.diff_text_bg }), NeogitDiffAddHighlight { bg = p.diff_add },
-- indent-blankline
IndentBlanklineChar({ fg = p.gutter_bg }),
IndentBlanklineContextChar({ fg = p.border }),
} }
end) end)
---@diagnostic enable: undefined-global