-- -- Built with, -- -- ,gggg, -- d8" "8I ,dPYb, -- 88 ,dP IP'`Yb -- 8888888P" I8 8I -- 88 I8 8' -- 88 gg gg ,g, I8 dPgg, -- ,aa,_88 I8 8I ,8'8, I8dP" "8I -- dP" "88P I8, ,8I ,8' Yb I8P I8 -- Yb,_,d88b,,_ ,d8b, ,d8b,,8'_ 8) ,d8 I8, -- "Y8P" "Y888888P'"Y88P"`Y8P' "YY8P8P88P `Y8 -- ---@diagnostic disable: undefined-global local lush = require("lush") local primary_colors = { none = "NONE", black_dark = "#0A0A0F", black = "#111118", black_light = "#1D1B1C", grey_darkest = "#474344", grey_darker = "#5C5758", grey_dark = "#5F595A", grey = "#766F71", grey_lighter = "#9C9697", silver = "#B0ABAC", silver_lighter = "#BFBBBC", white = "#FFFFFF", blue_saturated = "#004EAD", blue_darkest = "#344074", blue_darker = "#445397", blue = "#727FAF", blue_black_dark = "#20202C", blue_black = "#212130", blue_black_light = "#242433", blue_grey_darkest = "#282839", blue_grey_darker = "#2E2E42", blue_grey_dark = "#3F3F5A", blue_grey = "#434360", blue_grey_light = "#4D4D6F", cyan = "#009999", green_darkest = "#1E3A1E", green_darker = "#364936", green_dark = "#506D50", green = "#6A906A", yellow_darkest = "#2E2E1E", yellow = "#B5A15A", orange_darkest = "#4D3D22", orange_dark = "#B47A41", orange = "#C18A53", orange_light = "#CC9E71", red_darkest = "#3A1E1E", red_darker = "#4A2020", red_dark = "#952D2D", red = "#C96B68", purple = "#927B9E", tan = "#9A8065" } local colors = { None = primary_colors.none, IconAzureForeground = primary_colors.blue_saturated, IconCyanForeground = primary_colors.cyan, GutterBackground = primary_colors.black_dark, Background = primary_colors.black, FaintForeground = primary_colors.black_light, AddedBackground = primary_colors.green_darkest, InactiveStatusBackground = primary_colors.blue_black_dark, StatusBackground = primary_colors.blue_black, RaisedBackground = primary_colors.blue_black_light, TabBackground = primary_colors.blue_grey_darkest, ChangedBackground = primary_colors.yellow_darkest, SecondaryBackground = primary_colors.blue_grey_darker, ModeCommandBackground = primary_colors.blue_darkest, TodoBackground = primary_colors.green_darker, RemovedBackground = primary_colors.red_darkest, SelectionBackground = primary_colors.blue_grey_dark, ModeNormalBackground = primary_colors.blue_grey, ModeVisualBackground = primary_colors.blue_darker, ConcealBackground = primary_colors.grey_darkest, ScrollbarBackground = primary_colors.blue_grey_light, ModeInsertBackground = primary_colors.green_dark, LineNrForeground = primary_colors.grey_darker, ErrorBackground = primary_colors.red_darker, DiffTextBackground = primary_colors.orange_darkest, DimForeground = primary_colors.grey_dark, AccentForeground = primary_colors.blue, PositiveForeground = primary_colors.green, CommentForeground = primary_colors.grey, ModeReplaceBackground = primary_colors.red_dark, ConstantForeground = primary_colors.purple, DirectoryIconForeground = primary_colors.tan, SecondaryForeground = primary_colors.grey_lighter, NormalForeground = primary_colors.silver, WarningForeground = primary_colors.yellow, OperatorForeground = primary_colors.orange_dark, EmphasisForeground = primary_colors.silver_lighter, SyntaxForeground = primary_colors.orange, FunctionForeground = primary_colors.orange_light, ErrorForeground = primary_colors.red, ScrollbarThumbBackground = primary_colors.white } vim.g.choosewin_color_label = { gui = {colors.SelectionBackground, colors.EmphasisForeground, "bold"} } vim.g.choosewin_color_label_current = { gui = {colors.PositiveForeground, colors.RaisedBackground, "bold"} } vim.g.choosewin_color_other = { gui = {colors.StatusBackground} } local create_lualine_theme = function() local theme_colors if vim.o.termguicolors then theme_colors = { background_i = colors.ModeInsertBackground, background_n = colors.ModeNormalBackground, background_b = colors.SecondaryBackground, background_c = colors.StatusBackground, background_cm = colors.ModeCommandBackground, background_r = colors.ModeReplaceBackground, background_v = colors.ModeVisualBackground, foreground = colors.EmphasisForeground, foreground_2 = colors.NormalForeground, foreground_3 = colors.SecondaryForeground } else theme_colors = { background_i = 2, background_n = 8, background_b = 8, background_c = 0, background_cm = 4, background_r = 1, background_v = 4, foreground = 15, foreground_2 = 7, foreground_3 = 8 } end return { normal = { a = { bg = theme_colors.background_n, fg = theme_colors.foreground, gui = "bold" }, b = {bg = theme_colors.background_b, fg = theme_colors.foreground_2}, c = {bg = theme_colors.background_c, fg = theme_colors.foreground_3} }, insert = { a = { bg = theme_colors.background_i, fg = theme_colors.foreground, gui = "bold" }, b = {bg = theme_colors.background_b, fg = theme_colors.foreground_2}, c = {bg = theme_colors.background_c, fg = theme_colors.foreground_3} }, visual = { a = { bg = theme_colors.background_v, fg = theme_colors.foreground, gui = "bold" }, b = {bg = theme_colors.background_b, fg = theme_colors.foreground_2}, c = {bg = theme_colors.background_c, fg = theme_colors.foreground_3} }, replace = { a = { bg = theme_colors.background_r, fg = theme_colors.foreground, gui = "bold" }, b = {bg = theme_colors.background_b, fg = theme_colors.foreground_2}, c = {bg = theme_colors.background_c, fg = theme_colors.foreground_3} }, command = { a = { bg = theme_colors.background_cm, fg = theme_colors.foreground, gui = "bold" }, b = {bg = theme_colors.background_b, fg = theme_colors.foreground_2}, c = {bg = theme_colors.background_c, fg = theme_colors.foreground_3} }, inactive = { a = { bg = theme_colors.background_n, fg = theme_colors.foreground, gui = "bold" }, b = {bg = theme_colors.background_b, fg = theme_colors.foreground_2}, c = {bg = theme_colors.background_c, fg = theme_colors.foreground_3} } } end local ok, lualine = pcall(require, "lualine") if ok then lualine.setup({options = {theme = create_lualine_theme()}}) local group = vim.api.nvim_create_augroup("darcula_lush_theme_cfg", {clear = true}) vim.api.nvim_create_autocmd( "ColorScheme", { group = group, pattern = "darcula_lush", callback = function() lualine.setup({options = {theme = create_lualine_theme()}}) require("lush_theme.darcula_lush.cterm").apply_matching("^lualine_") end } ) end local theme = lush( function(injected_functions) local sym = injected_functions.sym return { -- Diagnostics general -- CodeError {gui = "reverse"}, CodeHint {gui = "reverse"}, CodeInfo {gui = "reverse"}, CodeWarn {gui = "reverse"}, ErrorSign {bg = colors.GutterBackground, fg = colors.ErrorForeground}, HintSign {bg = colors.GutterBackground, fg = colors.SecondaryForeground}, InfoSign {bg = colors.GutterBackground, fg = colors.EmphasisForeground}, WarningSign {bg = colors.GutterBackground, fg = colors.WarningForeground}, IblScope {fg = colors.SecondaryForeground, bg = colors.None}, IdentifierUnderCaret { gui = "underline,bold,italic" }, IdentifierUnderCaretWrite { gui = "underline,bold,italic" }, -- -- -- c/cpp cFunction {fg = colors.FunctionForeground}, cppDestructor {fg = colors.FunctionForeground}, -- -- CoC CocErrorHighlight {fg = colors.ErrorForeground, gui = "bold,underline"}, CocHintHighlight {fg = colors.SecondaryForeground, gui = "bold,underline"}, CocInfoHighlight {fg = colors.EmphasisForeground, gui = "bold,underline"}, CocWarnHighlight {fg = colors.WarningForeground, gui = "bold,underline"}, CocHighlightRead {IdentifierUnderCaret}, CocHighlightText {IdentifierUnderCaret}, CocHighlightWrite {IdentifierUnderCaretWrite}, CocCodeLens {fg = colors.DimForeground, bg = colors.None}, CocErrorFloat {fg = colors.EmphasisForeground, bg = colors.RaisedBackground}, CocFloating {fg = colors.EmphasisForeground, bg = colors.RaisedBackground}, CocHintFloat {fg = colors.EmphasisForeground, bg = colors.RaisedBackground}, CocHintVirtualText {fg = colors.DimForeground, bg = colors.None}, CocInfoFloat {fg = colors.EmphasisForeground, bg = colors.RaisedBackground}, CocInlayHint {fg = colors.DimForeground, bg = colors.None}, CocMenuSel {bg = colors.SelectionBackground}, CocNotificationError { fg = colors.EmphasisForeground, bg = colors.RaisedBackground }, CocNotificationInfo { fg = colors.EmphasisForeground, bg = colors.RaisedBackground }, CocNotificationProgress { fg = colors.SecondaryForeground, bg = colors.RaisedBackground }, CocNotificationWarning { fg = colors.EmphasisForeground, bg = colors.RaisedBackground }, CocPumMenu {fg = colors.EmphasisForeground, bg = colors.RaisedBackground}, CocSearch {fg = colors.AccentForeground}, CocSemClass {fg = colors.FunctionForeground}, CocSymbolConstant {fg = colors.ConstantForeground}, CocSymbolConstructor {fg = colors.FunctionForeground}, CocSymbolFunction {fg = colors.FunctionForeground}, CocSymbolMethod {fg = colors.FunctionForeground}, CocUnderline {fg = colors.AccentForeground, gui = "bold,underline"}, CocWarningFloat {fg = colors.EmphasisForeground, bg = colors.RaisedBackground}, -- easymotion EasyMotionShade {fg = colors.CommentForeground}, EasyMotionIncSearch { fg = colors.AccentForeground, gui = "bold,italic,underline" }, EasyMotionTarget {gui = "underline", fg = colors.WarningForeground}, -- -- fidget FidgetDone {fg = colors.PositiveForeground}, FidgetGroup {fg = colors.FaintForeground}, FidgetProgress {fg = colors.AccentForeground}, -- -- gitsigns GitSignsCurrentLineBlame {fg = colors.CommentForeground, bg = colors.None}, -- -- lua luaParenError {bg = colors.None}, -- -- nvim-cmp CmpItemAbbr {fg = colors.NormalForeground}, CmpItemAbbrDeprecated { fg = colors.CommentForeground, gui = "strikethrough" }, CmpItemAbbrMatch {fg = colors.AccentForeground}, CmpItemAbbrMatchFuzzy {CmpItemAbbrMatch}, CmpItemKind {fg = colors.SyntaxForeground}, CmpItemKindDefault {fg = colors.SyntaxForeground}, CmpItemMenu {fg = colors.EmphasisForeground}, -- -- nvim notify NotifyBackground { bg = colors.RaisedBackground, fg = colors.RaisedBackground }, NotifyINFOBody { -- bg = colors.RaisedBackground, fg = colors.EmphasisForeground }, NotifyINFOBorder { -- bg = colors.RaisedBackground, fg = colors.EmphasisForeground }, NotifyINFOIcon { -- bg = colors.RaisedBackground, fg = colors.PositiveForeground }, NotifyINFOTitle { -- bg = colors.RaisedBackground, fg = colors.PositiveForeground }, NotifyERRORBody { -- bg = colors.RaisedBackground, fg = colors.EmphasisForeground }, NotifyERRORBorder { -- bg = colors.RaisedBackground, fg = colors.EmphasisForeground }, NotifyERRORIcon { -- bg = colors.RaisedBackground, fg = colors.ErrorForeground }, NotifyERRORTitle { -- bg = colors.RaisedBackground, fg = colors.ErrorForeground }, NotifyWARNBody { -- bg = colors.RaisedBackground, fg = colors.EmphasisForeground }, NotifyWARNBorder { -- bg = colors.RaisedBackground, fg = colors.EmphasisForeground }, NotifyWARNIcon { -- bg = colors.RaisedBackground, fg = colors.WarningForeground }, NotifyWARNTitle { -- bg = colors.RaisedBackground, fg = colors.WarningForeground }, NotifyDEBUGBody { -- bg = colors.RaisedBackground, fg = colors.EmphasisForeground }, NotifyDEBUGBorder { -- bg = colors.RaisedBackground, fg = colors.EmphasisForeground }, NotifyDEBUGIcon { -- bg = colors.RaisedBackground, fg = colors.AccentForeground }, NotifyDEBUGTitle { -- bg = colors.RaisedBackground, fg = colors.AccentForeground }, NotifyTRACEBody { -- bg = colors.RaisedBackground, fg = colors.ConstantForeground }, NotifyTRACEBorder { -- bg = colors.RaisedBackground, fg = colors.ConstantForeground }, -- -- nvim tree NvimTreeEndOfBuffer {bg = colors.Background}, NvimTreeFolderIcon {fg = colors.DirectoryIconForeground}, NvimTreeFolderName {fg = colors.SecondaryForeground, gui = "bold"}, NvimTreeNormal {bg = colors.Background, fg = colors.SecondaryForeground}, NvimTreeOpenedFolderName {fg = colors.SecondaryForeground, gui = "bold"}, NvimTreeRootFolder {fg = colors.PositiveForeground}, NvimTreeGitDirty {fg = colors.ErrorForeground}, NvimTreeGitDirtyIcon {fg = colors.ErrorForeground}, NvimTreeSymlink {fg = colors.AccentForeground, gui = "italic"}, NvimTreeExecFile {fg = colors.PositiveForeground, gui = "italic"}, -- -- nvim scrollview ScrollView { fg = colors.None, bg = colors.ScrollbarThumbBackground }, -- -- Telescope TelescopeBorder {bg = colors.TabBackground}, TelescopeMatching {fg = colors.AccentForeground}, TelescopeNormal {bg = colors.Background}, TelescopePromptNormal {bg = colors.Background}, -- -- Neovim Added {fg = colors.PositiveForeground}, Changed {gui = "italic,underline"}, Character {fg = colors.PositiveForeground}, ColorColumn {bg = colors.RaisedBackground}, Comment {fg = colors.CommentForeground}, Conceal {bg = colors.ConcealBackground, fg = colors.SecondaryForeground}, Conditional {fg = colors.SyntaxForeground}, Constant {fg = colors.ConstantForeground}, Cursor {gui = "reverse"}, CursorColumn { gui = "underline", fg = colors.EmphasisForeground, bg = colors.None }, CursorLine {bg = colors.RaisedBackground}, CursorLineNr { bg = colors.GutterBackground, fg = colors.PositiveForeground }, CurSearch { fg = colors.AccentForeground, bg = colors.None, gui = "bold,italic,underline" }, Delimiter {fg = colors.FunctionForeground}, DiagnosticError {CodeError}, DiagnosticHint {CodeHint}, DiagnosticInfo {CodeInfo}, DiagnosticWarn {CodeWarn}, DiagnosticFloatingError {CocErrorFloat}, DiagnosticFloatingHint {CocHintFloat}, DiagnosticFloatingInfo {CocInfoFloat}, DiagnosticFloatingWarn {CocWarningFloat}, DiagnosticSignError { fg = colors.ErrorForeground, bg = colors.GutterBackground }, DiagnosticSignHint {fg = colors.SecondaryForeground, bg = colors.GutterBackground}, DiagnosticSignInfo {fg = colors.EmphasisForeground, bg = colors.GutterBackground}, DiagnosticSignWarn { fg = colors.WarningForeground, bg = colors.GutterBackground }, DiagnosticLineNrError { fg = colors.ErrorForeground, bg = colors.GutterBackground }, DiagnosticLineNrHint { fg = colors.SecondaryForeground, bg = colors.GutterBackground }, DiagnosticLineNrInfo { fg = colors.EmphasisForeground, bg = colors.GutterBackground }, DiagnosticLineNrWarn { fg = colors.WarningForeground, bg = colors.GutterBackground }, DiagnosticUnderlineError { CocErrorHighlight }, DiagnosticUnderlineHint { CocHintHighlight }, DiagnosticUnderlineInfo { CocInfoHighlight }, DiagnosticUnderlineWarn { CocWarnHighlight }, DiagnosticVirtualTextError {fg = colors.DimForeground, bg = colors.None}, DiagnosticVirtualTextWarn {fg = colors.DimForeground, bg = colors.None}, DiagnosticVirtualTextInfo {fg = colors.DimForeground, bg = colors.None}, DiagnosticVirtualTextHint {fg = colors.DimForeground, bg = colors.None}, DiffAdd {bg = colors.AddedBackground}, DiffChange {bg = colors.ChangedBackground}, DiffDelete {bg = colors.RemovedBackground}, DiffText {bg = colors.DiffTextBackground}, Directory {fg = colors.SecondaryForeground}, EndOfBuffer {bg = colors.Background}, Error { gui = "italic", bg = colors.ErrorBackground, fg = colors.ErrorForeground }, ErrorMsg {fg = colors.ErrorForeground}, Exception {fg = colors.SyntaxForeground}, FloatBorder {bg = colors.RaisedBackground}, FoldColumn {fg = colors.ErrorForeground, bg = colors.GutterBackground}, Folded {fg = colors.CommentForeground, bg = colors.ConcealBackground}, Function {fg = colors.FunctionForeground}, Identifier {fg = colors.NormalForeground}, IncSearch {fg = colors.AccentForeground, gui = "bold,italic,underline"}, Keyword {fg = colors.SyntaxForeground}, Label {fg = colors.SyntaxForeground}, LineNr {bg = colors.GutterBackground, fg = colors.LineNrForeground}, LineNrSpecial {bg = colors.GutterBackground, fg = colors.SyntaxForeground}, LspReferenceRead { gui = "underline,italic", guibg = colors.None }, LspReferenceText { gui = "underline,italic", guibg = colors.None }, LspReferenceWrite { gui = "underline,bold,italic", guibg = colors.None }, LspCodeLens {fg = colors.DimForeground}, LspCodeLensSeparator {fg = colors.DimForeground}, LspSignatureActiveParameter {gui = "italic", fg = colors.AccentForeground}, MatchParen { gui = "italic,bold", bg = colors.None }, ModeMsg {fg = colors.PositiveForeground}, MoreMsg {fg = colors.PositiveForeground}, NonText {fg = colors.DimForeground}, Normal {bg = colors.Background, fg = colors.NormalForeground}, NormalFloat {bg = colors.RaisedBackground, fg = colors.EmphasisForeground}, NormalNC {bg = colors.Background, fg = colors.NormalForeground}, Number {fg = colors.AccentForeground}, Operator {fg = colors.OperatorForeground}, Pmenu {bg = colors.RaisedBackground, fg = colors.EmphasisForeground}, PmenuMatch {fg = colors.AccentForeground}, PmenuSbar {bg = colors.SecondaryBackground}, PmenuSel {bg = colors.SelectionBackground}, PmenuThumb {bg = colors.ScrollbarBackground}, PreProc {fg = colors.WarningForeground}, Question {fg = colors.PositiveForeground}, QuickFixLine { fg = colors.EmphasisForeground, bg = colors.None }, Removed {fg = colors.ErrorForeground}, Repeat {fg = colors.SyntaxForeground}, Search { fg = colors.AccentForeground, bg = colors.None, gui = "bold,italic,underline" }, SignColumn {bg = colors.GutterBackground}, Special {fg = colors.SyntaxForeground}, SpecialKey {fg = colors.DimForeground}, SpellBad {gui = "italic", fg = colors.NormalForeground}, SpellCap {gui = "italic", fg = colors.NormalForeground}, SpellLocal {gui = "italic", fg = colors.NormalForeground}, SpellRare {gui = "italic", fg = colors.NormalForeground}, Statement {fg = colors.SyntaxForeground}, StatusLine {bg = colors.StatusBackground}, StatusLineNC {bg = colors.InactiveStatusBackground}, String {fg = colors.PositiveForeground}, Substitute {fg = colors.AccentForeground, gui = "underline"}, TabLine {bg = colors.TabBackground}, TabLineFill {bg = colors.Background}, TabLineSel {gui = "bold", bg = colors.SelectionBackground}, Title {fg = colors.SecondaryForeground}, Todo { bg = colors.TodoBackground, fg = colors.NormalForeground, gui = "italic" }, Type {fg = colors.SyntaxForeground}, Underlined {fg = colors.AccentForeground, gui = "underline"}, VertSplit {bg = colors.GutterBackground}, Visual {bg = colors.SelectionBackground}, WarningMsg {fg = colors.WarningForeground}, WinSeparator {bg = colors.GutterBackground}, -- -- mini.icons MiniIconsAzure {fg = colors.IconAzureForeground}, MiniIconsBlue {fg = colors.AccentForeground}, MiniIconsCyan {fg = colors.IconCyanForeground}, MiniIconsGreen {fg = colors.PositiveForeground}, MiniIconsGrey {fg = colors.NormalForeground}, MiniIconsOrange {fg = colors.SyntaxForeground}, MiniIconsPurple {fg = colors.ConstantForeground}, MiniIconsRed {fg = colors.ErrorForeground}, MiniIconsYellow {fg = colors.WarningForeground}, -- -- mini.statusline MiniStatuslineDevinfo { bg = colors.SecondaryBackground }, MiniStatuslineFileinfo { bg = colors.SecondaryBackground }, MiniStatuslineFilename { bg = colors.StatusBackground }, MiniStatuslineModeNormal { fg = colors.EmphasisForeground, bg = colors.ModeNormalBackground, gui = "bold" }, MiniStatuslineModeInsert { bg = colors.ModeInsertBackground, fg = colors.EmphasisForeground, gui = "bold" }, MiniStatuslineModeVisual { bg = colors.ModeVisualBackground, fg = colors.EmphasisForeground, gui = "bold" }, MiniStatuslineModeReplace { bg = colors.ModeReplaceBackground, fg = colors.EmphasisForeground, gui = "bold" }, MiniStatuslineModeCommand { bg = colors.ModeCommandBackground, fg = colors.EmphasisForeground, gui = "bold" }, MiniStatuslineModeOther { MiniStatuslineModeCommand }, -- -- qf qfSeparator1 {Comment}, qfSeparator2 {Comment}, -- -- tree-sitter sym("@attribute") {fg = colors.CommentForeground}, sym("@comment.error") {fg = colors.ErrorForeground}, sym("@comment.warning") {fg = colors.WarningForeground}, sym("@constructor") {fg = colors.FunctionForeground}, sym("@function") {fg = colors.FunctionForeground}, sym("@function.builtin") {fg = colors.FunctionForeground}, sym("@keyword.directive") {fg = colors.WarningForeground}, sym("@keyword.function") {fg = colors.SyntaxForeground}, sym("@keyword.import") {fg = colors.WarningForeground}, sym("@keyword.operator") {fg = colors.OperatorForeground, gui = Operator.gui}, sym("@lsp.type.property.lua") {fg = colors.ConstantForeground}, sym("@module") {fg = colors.SyntaxForeground}, sym("@number") {fg = colors.AccentForeground}, sym("@number.float") {fg = colors.AccentForeground}, sym("@operator") {fg = colors.OperatorForeground, gui = Operator.gui}, sym("@operator.special") {fg = colors.OperatorForeground, gui = Operator.gui}, sym("@punctuation.bracket") {fg = colors.FunctionForeground}, sym("@punctuation.delimiter") {fg = colors.SyntaxForeground}, sym("@punctuation.special") {fg = colors.SyntaxForeground}, sym("@type.cpp") {fg = colors.FunctionForeground}, sym("@type.definition") {fg = colors.ConstantForeground, gui = ""}, sym("@variable") {fg = colors.NormalForeground}, sym("@variable.member") {fg = colors.ConstantForeground}, sym("@variable.member.cpp") {fg = colors.NormalForeground} } end ) -- return our parsed theme for extension or use else where. return theme -- vi:nowrap