feat: enable dms theme, if available
This commit is contained in:
+142
-131
@@ -1,140 +1,151 @@
|
|||||||
return {
|
return {
|
||||||
-- color theme
|
-- color theme
|
||||||
"EdenEast/nightfox.nvim",
|
"EdenEast/nightfox.nvim",
|
||||||
lazy = false,
|
lazy = false,
|
||||||
priority = 1000,
|
priority = 1000,
|
||||||
config = function()
|
config = function()
|
||||||
local Shade = require("nightfox.lib.shade")
|
local Shade = require("nightfox.lib.shade")
|
||||||
require("nightfox").setup({
|
require("nightfox").setup({
|
||||||
options = {
|
options = {
|
||||||
transparent = true,
|
transparent = true,
|
||||||
styles = {
|
styles = {
|
||||||
comments = "italic",
|
comments = "italic",
|
||||||
functions = "italic",
|
functions = "italic",
|
||||||
keywords = "italic",
|
keywords = "italic",
|
||||||
types = "italic",
|
types = "italic",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
palettes = {
|
palettes = {
|
||||||
all = {
|
all = {
|
||||||
black = Shade.new("#404944", 0.15, -0.15),
|
black = Shade.new("#404944", 0.15, -0.15),
|
||||||
gray = Shade.new("#505050", 0.15, -0.15),
|
gray = Shade.new("#505050", 0.15, -0.15),
|
||||||
white = Shade.new("#dee4df", 0.15, -0.15),
|
white = Shade.new("#dee4df", 0.15, -0.15),
|
||||||
red = Shade.new("#ff6060", 0.15, -0.15),
|
red = Shade.new("#ff6060", 0.15, -0.15),
|
||||||
darkred = Shade.new("#AA3030", 0.15, -0.15),
|
darkred = Shade.new("#AA3030", 0.15, -0.15),
|
||||||
strongred = Shade.new("#bb0000", 0.15, -0.15),
|
strongred = Shade.new("#bb0000", 0.15, -0.15),
|
||||||
orange = Shade.new("#ce8c14", 0.15, -0.15),
|
orange = Shade.new("#ce8c14", 0.15, -0.15),
|
||||||
green = Shade.new("#a3d397", 0.10, -0.15),
|
green = Shade.new("#a3d397", 0.10, -0.15),
|
||||||
darkgreen = Shade.new("#005602", 0.10, -0.15),
|
darkgreen = Shade.new("#005602", 0.10, -0.15),
|
||||||
darkyellow = Shade.new("#dfd100", 0.10, -0.15),
|
darkyellow = Shade.new("#dfd100", 0.10, -0.15),
|
||||||
yellow = Shade.new("#e3c46d", 0.15, -0.15),
|
yellow = Shade.new("#e3c46d", 0.15, -0.15),
|
||||||
darkblue = Shade.new("#1010cc", 0.15, -0.15),
|
darkblue = Shade.new("#1010cc", 0.15, -0.15),
|
||||||
blue = Shade.new("#7070dd", 0.15, -0.15),
|
blue = Shade.new("#7070dd", 0.15, -0.15),
|
||||||
magenta = Shade.new("#C02490", 0.30, -0.15),
|
magenta = Shade.new("#C02490", 0.30, -0.15),
|
||||||
pink = Shade.new("#ff82c2", 0.15, -0.15),
|
pink = Shade.new("#ff82c2", 0.15, -0.15),
|
||||||
purple = Shade.new("#761464", 0.15, -0.15),
|
purple = Shade.new("#761464", 0.15, -0.15),
|
||||||
turquoise = Shade.new("#3fffb0", 0.15, -0.15),
|
turquoise = Shade.new("#3fffb0", 0.15, -0.15),
|
||||||
cyan = Shade.new("#7ac9ff", 0.15, -0.15),
|
cyan = Shade.new("#7ac9ff", 0.15, -0.15),
|
||||||
lightblue = Shade.new("#add8e6", 0.15, -0.15),
|
lightblue = Shade.new("#add8e6", 0.15, -0.15),
|
||||||
softblue = Shade.new("#10aaff", 0.15, -0.15),
|
softblue = Shade.new("#10aaff", 0.15, -0.15),
|
||||||
brown = Shade.new("#664010", 0.15, -0.15),
|
brown = Shade.new("#664010", 0.15, -0.15),
|
||||||
|
|
||||||
bg0 = "#0f1512", -- Dark bg (status line and float)
|
bg0 = "#0f1512", -- Dark bg (status line and float)
|
||||||
bg1 = "#0f1512", -- Default bg
|
bg1 = "#0f1512", -- Default bg
|
||||||
bg2 = "#1b211e", -- Lighter bg (colorcolm folds)
|
bg2 = "#1b211e", -- Lighter bg (colorcolm folds)
|
||||||
bg3 = "#252b28", -- Lighter bg (cursor line)
|
bg3 = "#252b28", -- Lighter bg (cursor line)
|
||||||
bg4 = "#303633", -- Conceal, border fg
|
bg4 = "#303633", -- Conceal, border fg
|
||||||
bgDark = "#0c0c0c",
|
bgDark = "#0c0c0c",
|
||||||
|
|
||||||
fg0 = "#dee4df", -- Lighter fg
|
fg0 = "#dee4df", -- Lighter fg
|
||||||
fg1 = "#dee4df", -- Default fg
|
fg1 = "#dee4df", -- Default fg
|
||||||
fg2 = "#dee4df", -- Darker fg (status line)
|
fg2 = "#dee4df", -- Darker fg (status line)
|
||||||
fg3 = "#89938d", -- Darker fg (line numbers, fold colums)
|
fg3 = "#89938d", -- Darker fg (line numbers, fold colums)
|
||||||
|
|
||||||
sel0 = "#404944", -- Popup bg, visual selection
|
sel0 = "#404944", -- Popup bg, visual selection
|
||||||
sel1 = "#00513b", -- Popup sel bg, search bg
|
sel1 = "#00513b", -- Popup sel bg, search bg
|
||||||
|
|
||||||
comment = "#89938d",
|
comment = "#89938d",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
specs = {
|
specs = {
|
||||||
carbonfox = {
|
carbonfox = {
|
||||||
syntax = {
|
syntax = {
|
||||||
comment = "comment",
|
comment = "comment",
|
||||||
bracket = "darkyellow",
|
bracket = "darkyellow",
|
||||||
builtin0 = "turquoise",
|
builtin0 = "turquoise",
|
||||||
builtin1 = "cyan",
|
builtin1 = "cyan",
|
||||||
builtin2 = "lightblue",
|
builtin2 = "lightblue",
|
||||||
conditional = "darkblue",
|
conditional = "darkblue",
|
||||||
const = "gray",
|
const = "gray",
|
||||||
dep = "darkred",
|
dep = "darkred",
|
||||||
field = "green",
|
field = "green",
|
||||||
func = "pink",
|
func = "pink",
|
||||||
ident = "darkgreen",
|
ident = "darkgreen",
|
||||||
keyword = "blue",
|
keyword = "blue",
|
||||||
number = "yellow",
|
number = "yellow",
|
||||||
operator = "white",
|
operator = "white",
|
||||||
preproc = "strongred",
|
preproc = "strongred",
|
||||||
regex = "purple",
|
regex = "purple",
|
||||||
statement = "magenta",
|
statement = "magenta",
|
||||||
string = "softblue",
|
string = "softblue",
|
||||||
type = "red",
|
type = "red",
|
||||||
variable = "orange",
|
variable = "orange",
|
||||||
},
|
},
|
||||||
diag = {
|
diag = {
|
||||||
error = "darkred",
|
error = "darkred",
|
||||||
warn = "yellow",
|
warn = "yellow",
|
||||||
info = "softblue",
|
info = "softblue",
|
||||||
hint = "fg3",
|
hint = "fg3",
|
||||||
ok = "darkgreen",
|
ok = "darkgreen",
|
||||||
},
|
},
|
||||||
diag_bg = {
|
diag_bg = {
|
||||||
error = "red",
|
error = "red",
|
||||||
warn = "#a16b00",
|
warn = "#a16b00",
|
||||||
info = "cyan",
|
info = "cyan",
|
||||||
hint = "bg3",
|
hint = "bg3",
|
||||||
ok = "green",
|
ok = "green",
|
||||||
},
|
},
|
||||||
diff = {
|
diff = {
|
||||||
add = "darkgreen",
|
add = "darkgreen",
|
||||||
delete = "darkred",
|
delete = "darkred",
|
||||||
changed = "softblue",
|
changed = "softblue",
|
||||||
text = "fg0",
|
text = "fg0",
|
||||||
},
|
},
|
||||||
git = {
|
git = {
|
||||||
add = "darkgreen",
|
add = "darkgreen",
|
||||||
removed = "darkred",
|
removed = "darkred",
|
||||||
changed = "softblue",
|
changed = "softblue",
|
||||||
conflict = "orange",
|
conflict = "orange",
|
||||||
ignored = "gray",
|
ignored = "gray",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
groups = {
|
groups = {
|
||||||
all = {
|
all = {
|
||||||
Cursor = { fg = "palette.white", bg = "palette.lightblue" }, -- character under the cursor
|
Cursor = { fg = "palette.white", bg = "palette.lightblue" }, -- character under the cursor
|
||||||
WinSeparator = { fg = "palette.bg2" }, -- the column separating vertically split windows
|
WinSeparator = { fg = "palette.bg2" }, -- the column separating vertically split windows
|
||||||
EndOfBuffer = { link = "WinSeparator" }, -- filler lines (~) after the end of the buffer. By default, this is highlighted like |hl-NonText|.
|
EndOfBuffer = { link = "WinSeparator" }, -- filler lines (~) after the end of the buffer. By default, this is highlighted like |hl-NonText|.
|
||||||
CursorLine = { bg = "palette.bg1" },
|
CursorLine = { bg = "palette.bg1" },
|
||||||
CursorLineNr = { fg = "palette.cyan", style = "bold" }, -- Like LineNr when 'cursorline' or 'relativenumber' is set for the cursor line.
|
CursorLineNr = { fg = "palette.cyan", style = "bold" }, -- Like LineNr when 'cursorline' or 'relativenumber' is set for the cursor line.
|
||||||
Search = { fg = "palette.softblue", bg = "#00513b" }, -- Last search pattern highlighting (see 'hlsearch'). Also used for similar items that need to stand out.
|
Search = { fg = "palette.softblue", bg = "#00513b" }, -- Last search pattern highlighting (see 'hlsearch'). Also used for similar items that need to stand out.
|
||||||
IncSearch = { fg = "palette.softblue", bg = "#1a6b51" }, -- 'incsearch' highlighting; also used for the text replaced with ":s///c"
|
IncSearch = { fg = "palette.softblue", bg = "#1a6b51" }, -- 'incsearch' highlighting; also used for the text replaced with ":s///c"
|
||||||
ModeMsg = { fg = "palette.fg3", style = "bold" }, -- 'showmode' message (e.g., "-- INSERT --")
|
ModeMsg = { fg = "palette.fg3", style = "bold" }, -- 'showmode' message (e.g., "-- INSERT --")
|
||||||
|
|
||||||
SnacksDashboardNormal = { fg = "palette.green" },
|
SnacksDashboardNormal = { fg = "palette.green" },
|
||||||
SnacksDashboardDesc = { fg = "palette.softblue" },
|
SnacksDashboardDesc = { fg = "palette.softblue" },
|
||||||
SnacksDashboardFile = { fg = "palette.softblue" },
|
SnacksDashboardFile = { fg = "palette.softblue" },
|
||||||
SnacksDashboardIcon = { fg = "palette.orange" },
|
SnacksDashboardIcon = { fg = "palette.orange" },
|
||||||
SnacksDashboardHeader = { fg = "palette.darkred" },
|
SnacksDashboardHeader = { fg = "palette.darkred" },
|
||||||
SnacksDashboardTitle = { fg = "palette.turquoise" },
|
SnacksDashboardTitle = { fg = "palette.turquoise" },
|
||||||
SnacksIndentScope = { fg = "palette.lightblue" },
|
SnacksIndentScope = { fg = "palette.lightblue" },
|
||||||
NormalFloat = { bg = "palette.bgDark" },
|
NormalFloat = { bg = "palette.bgDark" },
|
||||||
Directory = { fg = "palette.cyan" }
|
Directory = { fg = "palette.cyan" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
if not vim.g.vscode then
|
if not vim.g.vscode then
|
||||||
vim.cmd.colorscheme('carbonfox')
|
local function apply()
|
||||||
end
|
local files = vim.fn.globpath(vim.o.runtimepath, "colors/*", false, true) ---@type string[]
|
||||||
end,
|
for _, file in ipairs(files) do
|
||||||
|
local name = vim.fn.fnamemodify(file, ":t:r")
|
||||||
|
if name == "dms" then
|
||||||
|
vim.cmd.colorscheme("dms")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
vim.cmd.colorscheme("carbonfox")
|
||||||
|
end
|
||||||
|
apply()
|
||||||
|
end
|
||||||
|
end,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user