neovim light theme working 1
This commit is contained in:
@@ -1,19 +1,18 @@
|
||||
local M = {}
|
||||
|
||||
function M.get(P)
|
||||
local colors = {
|
||||
base = P.white,
|
||||
surface = P.gray_light,
|
||||
text = P.black,
|
||||
muted = P.gray,
|
||||
accent = P.blue,
|
||||
accent_light = P.blue_light,
|
||||
syntax = 60,
|
||||
none = "NONE",
|
||||
}
|
||||
local colors = {
|
||||
base = P.white,
|
||||
surface = P.gray_light,
|
||||
text = P.black,
|
||||
muted = P.gray,
|
||||
accent = P.blue,
|
||||
accent_light = P.blue_light,
|
||||
syntax = P.slate_indigo,
|
||||
none = "NONE",
|
||||
}
|
||||
|
||||
return vim.tbl_extend("force", P, colors)
|
||||
return vim.tbl_extend("force", P, colors)
|
||||
end
|
||||
|
||||
return M
|
||||
|
||||
|
||||
@@ -3,16 +3,18 @@ local M = {}
|
||||
function M.get(C)
|
||||
return {
|
||||
Normal = { fg = C.text, bg = C.none },
|
||||
Directory = { fg = C.accent },
|
||||
Question = { fg = C.text },
|
||||
LineNr = { fg = C.muted },
|
||||
CursorLineNr = { fg = C.accent, bold = true },
|
||||
CursorLine = { bg = C.surface },
|
||||
Visual = { bg = C.accent_light },
|
||||
|
||||
Search = { fg = C.yellow },
|
||||
CurSearch = { fg = C.base, bg = C.yellow, bold = true },
|
||||
IncSearch = { fg = C.base, bg = C.yellow, bold = true },
|
||||
CurSearch = { fg = C.yellow, bg = C.none, bold = true },
|
||||
IncSearch = { fg = C.yellow, bg = C.none, bold = true },
|
||||
|
||||
MatchParen = { fg = C.base, bg = C.accent },
|
||||
MatchParen = { fg = C.accent, bg = C.accent_light, bold = true },
|
||||
EndOfBuffer = { fg = C.base }, -- End-of-buffer marker (~ lines)
|
||||
|
||||
WinSeparator = { fg = C.muted },
|
||||
@@ -24,13 +26,6 @@ function M.get(C)
|
||||
TabLine = { fg = C.muted }, -- Unselected tab
|
||||
TabLineSel = { fg = C.text, bold = true }, -- Selected tab
|
||||
TabLineFill = { bg = C.none }, -- Empty space in the tabline
|
||||
|
||||
-- DiagnosticError = { undercurl = true, sp = C.red },
|
||||
-- DiagnosticWarn = { undercurl = true, sp = C.yellow },
|
||||
-- DiagnosticInfo = { underline = true, sp = C.accent },
|
||||
-- DiagnosticHint = { underline = true, sp = C.green },
|
||||
|
||||
Directory = { fg = C.accent },
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
@@ -1,13 +1,7 @@
|
||||
local M = {}
|
||||
|
||||
function M.get(C)
|
||||
return {
|
||||
NvimTreeFolderIcon = { fg = C.accent },
|
||||
NvimTreeRootFolder = { fg = C.text, bold = true },
|
||||
-- NvimTreeOpenedHL = { bg = C.surface },
|
||||
}
|
||||
return {}
|
||||
end
|
||||
|
||||
return M
|
||||
|
||||
|
||||
|
||||
@@ -2,10 +2,7 @@ local M = {}
|
||||
|
||||
function M.get(C)
|
||||
return {
|
||||
-- TelescopeBorder = { fg = C.muted, bg = C.green },
|
||||
TelescopePrompt = { fg = C.text, bg = C.green },
|
||||
-- TelescopePromptPrefix = { fg = C.accent, bg = C.red },
|
||||
-- TelescopeSelection = { bg = C.surface },
|
||||
TelescopeMatching = { fg = C.yellow, bg = C.none, bold = true },
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
@@ -1,24 +1,20 @@
|
||||
local M = {}
|
||||
|
||||
function M.get(C)
|
||||
local theme = {
|
||||
["@comment"] = { fg = C.muted, italic = true },
|
||||
["@spell"] = { fg = C.syntax },
|
||||
["@markup"] = { fg = C.syntax },
|
||||
["@text"] = { fg = C.syntax },
|
||||
["@property"] = { fg = C.syntax },
|
||||
["@conceal"] = { fg = C.syntax },
|
||||
}
|
||||
return {
|
||||
["@constant.macro"] = { fg = C.syntax },
|
||||
["@function.method"] = { fg = C.syntax },
|
||||
["@type.qualifier"] = { fg = C.syntax },
|
||||
["@variable.parameter"] = { fg = C.syntax },
|
||||
["@variable"] = { fg = C.syntax },
|
||||
["@type.definition"] = { fg = C.syntax },
|
||||
["@markup.italic"] = { fg = C.syntax },
|
||||
["@markup.strong"] = { fg = C.syntax },
|
||||
["@markup.underline"] = { fg = C.syntax },
|
||||
["@markup.strikethrough"] = { fg = C.syntax },
|
||||
|
||||
for _, hl in ipairs(vim.fn.getcompletion("@", "highlight")) do
|
||||
if theme[hl] == nil then
|
||||
theme[hl] = { fg = C.syntax }
|
||||
end
|
||||
end
|
||||
|
||||
return theme
|
||||
["@_jsx_attribute"] = { link = "Constant" },
|
||||
}
|
||||
end
|
||||
|
||||
return M
|
||||
|
||||
|
||||
|
||||
@@ -1,9 +1,36 @@
|
||||
local M = {}
|
||||
|
||||
-- fallback for vim without tree-sitter
|
||||
function M.get(C)
|
||||
return {}
|
||||
return {
|
||||
Comment = { fg = C.muted, italic = true },
|
||||
|
||||
-- general
|
||||
Constant = { fg = C.syntax },
|
||||
String = { fg = C.syntax },
|
||||
Function = { fg = C.syntax },
|
||||
Type = { fg = C.syntax },
|
||||
Statement = { fg = C.syntax },
|
||||
Identifier = { fg = C.syntax },
|
||||
Operator = { fg = C.syntax },
|
||||
PreProc = { fg = C.syntax },
|
||||
Special = { fg = C.syntax },
|
||||
Delimiter = { fg = C.syntax },
|
||||
Todo = { fg = C.syntax },
|
||||
Title = { fg = C.syntax },
|
||||
Underlined = { fg = C.syntax },
|
||||
|
||||
-- diffs
|
||||
Added = { fg = C.green },
|
||||
Removed = { fg = C.red },
|
||||
Changed = { fg = C.yellow },
|
||||
|
||||
-- diagnostics
|
||||
DiagnosticInfo = { fg = C.blue },
|
||||
DiagnosticWarn = { fg = C.yellow },
|
||||
DiagnosticError = { fg = C.red },
|
||||
DiagnosticDeprecated = { fg = C.magenta },
|
||||
DiagnosticUnderlineError = { fg = C.syntax, underline = true },
|
||||
}
|
||||
end
|
||||
|
||||
return M
|
||||
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
local M = {
|
||||
name = "invero",
|
||||
variant = "light",
|
||||
name = "invero",
|
||||
variant = "light",
|
||||
mode = "ansi",
|
||||
exclude_integrations = {},
|
||||
}
|
||||
|
||||
function M.load()
|
||||
local setup = require("themes." .. M.name .. ".setup")
|
||||
setup.reset(M)
|
||||
setup.apply(M)
|
||||
local setup = require("themes." .. M.name .. ".setup")
|
||||
setup.reset(M)
|
||||
setup.apply(M)
|
||||
end
|
||||
|
||||
return M
|
||||
|
||||
@@ -1,37 +1,52 @@
|
||||
local M = {}
|
||||
|
||||
function M.get()
|
||||
return {
|
||||
black = 0,
|
||||
gray = 247,
|
||||
gray_light = 253,
|
||||
red = 1,
|
||||
green = 2,
|
||||
yellow = 3,
|
||||
yellow_light = 180,
|
||||
blue = 4,
|
||||
blue_light = 153,
|
||||
magenta = 5,
|
||||
cyan = 6,
|
||||
white = 7,
|
||||
}
|
||||
local modes = {
|
||||
ansi = {
|
||||
black = 0,
|
||||
red = 1,
|
||||
green = 2,
|
||||
yellow = 3,
|
||||
blue = 4,
|
||||
magenta = 5,
|
||||
cyan = 6,
|
||||
white = 7,
|
||||
},
|
||||
default = {
|
||||
black = 238,
|
||||
red = 196,
|
||||
green = 35,
|
||||
yellow = 221,
|
||||
blue = 27,
|
||||
magenta = 125,
|
||||
cyan = 30,
|
||||
white = 255,
|
||||
},
|
||||
}
|
||||
|
||||
-- return {
|
||||
-- black = 238,
|
||||
-- gray = 247,
|
||||
-- gray_light = 253,
|
||||
-- red = 196,
|
||||
-- green = 35,
|
||||
-- yellow = 221,
|
||||
-- orange = 166,
|
||||
-- orange_light = 180,
|
||||
-- blue = 27,
|
||||
-- blue_light = 153,
|
||||
-- magenta = 125,
|
||||
-- cyan = 30,
|
||||
-- white = 255,
|
||||
-- }
|
||||
local shared_palette = {
|
||||
gray = 247,
|
||||
gray_light = 253,
|
||||
orange = 166,
|
||||
orange_light = 180,
|
||||
yellow_light = 180,
|
||||
blue_light = 153,
|
||||
slate_indigo = 60,
|
||||
}
|
||||
|
||||
---Get color palette
|
||||
---@param mode '"ansi"'|'"default"'
|
||||
---@return table
|
||||
function M.get(mode)
|
||||
local mode_palette = modes[mode]
|
||||
if not mode_palette then
|
||||
vim.notify(
|
||||
string.format('Invalid palette mode: "%s" (valid: ansi, default)', tostring(mode)),
|
||||
vim.log.levels.WARN,
|
||||
{ title = "palette" }
|
||||
)
|
||||
mode_palette = modes.default
|
||||
end
|
||||
return vim.tbl_extend("force", mode_palette, shared_palette)
|
||||
end
|
||||
|
||||
return M
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ end
|
||||
|
||||
function M.apply(theme)
|
||||
local base = "themes." .. theme.name
|
||||
local P = require(base .. ".palette").get()
|
||||
local P = require(base .. ".palette").get(theme.mode)
|
||||
local C = require(base .. ".colors").get(P)
|
||||
|
||||
local modules = {
|
||||
@@ -54,19 +54,10 @@ function M.apply(theme)
|
||||
end
|
||||
local hl = {}
|
||||
|
||||
-- ALT: Use both scenarios
|
||||
-- if type(v) == "number" then
|
||||
-- hl.ctermfg = v
|
||||
-- else
|
||||
-- hl.fg = v
|
||||
-- end
|
||||
|
||||
for k, v in pairs(opts) do
|
||||
if k == "fg" then
|
||||
hl.fg = v
|
||||
hl.ctermfg = v
|
||||
elseif k == "bg" then
|
||||
hl.bg = v
|
||||
hl.ctermbg = v
|
||||
else
|
||||
hl[k] = v -- bold, italic, underline, sp, etc.
|
||||
|
||||
Reference in New Issue
Block a user