add setup function
This commit is contained in:
parent
272d335276
commit
ee8d34c0f7
@ -1,7 +1,7 @@
|
||||
vim.g.colors_name = 'lupan'
|
||||
if vim.o.background == "dark" then
|
||||
package.loaded["lupancolors.lupan"] = nil
|
||||
require("lush")(require("lupancolors.lupan"))
|
||||
package.loaded["lupancolors.lupandark"] = nil
|
||||
require("lush")(require("lupancolors.lupandark"))
|
||||
else
|
||||
package.loaded["lupancolors.lupanlight"] = nil
|
||||
require("lush")(require("lupancolors.lupanlight"))
|
||||
|
@ -1,72 +1,23 @@
|
||||
local lush = require('lush')
|
||||
local hsl = lush.hsl -- We'll use hsl a lot so its nice to bind it separately
|
||||
local hsl = lush.hsl
|
||||
|
||||
---@diagnostic disable: undefined-global
|
||||
local theme = lush(function()
|
||||
local base = hsl(210, 40, 75)
|
||||
local red = base.hue(0)
|
||||
local orange = base.hue(30)
|
||||
local yellow = base.hue(60)
|
||||
local yellow_green = base.hue(90)
|
||||
local green = base.hue(120)
|
||||
local aquamarine = base.hue(150)
|
||||
local cyan = base.hue(180)
|
||||
local blue = base.hue(210)
|
||||
local lavender = base.hue(240)
|
||||
local purple = base.hue(270)
|
||||
local fuchsia = base.hue(300)
|
||||
local hot_pink = base.hue(330)
|
||||
return {
|
||||
-- See: h highlight-groups
|
||||
Normal { bg = base.de(65).da(75), fg = base.de(25) },
|
||||
CursorLine { bg = Normal.bg.li(10) },
|
||||
Visual { bg = Normal.bg.sa(20).li(20) },
|
||||
Comment { fg = base.de(75).da(20) },
|
||||
CursorColumn { CursorLine },
|
||||
LineNr { Comment, gui = "italic" },
|
||||
CursorLineNr { fg = blue, bg = CursorLine.bg, gui = "italic" },
|
||||
Search { bg = yellow, fg = Normal.bg },
|
||||
IncSearch { bg = yellow_green, fg = Normal.bg },
|
||||
String { fg = blue },
|
||||
PreProc { fg = lavender },
|
||||
Statement { fg = orange },
|
||||
Type { fg = yellow },
|
||||
Identifier { fg = Normal.fg },
|
||||
Function { fg = green },
|
||||
Operator { fg = aquamarine },
|
||||
Special { fg = purple },
|
||||
Constant { fg = cyan },
|
||||
NonText { fg = Normal.bg.li(10) },
|
||||
DiffAdd { fg = green },
|
||||
DiffDelete { fg = red },
|
||||
diffRemoved { fg = red },
|
||||
DiffChange { fg = blue },
|
||||
diffChanged { fg = blue },
|
||||
SignColumn { Normal },
|
||||
diffAdded { DiffAdd },
|
||||
MoreMsg { fg = green, gui = "bold" },
|
||||
Question { fg = green, gui = "bold" },
|
||||
TelescopeSelection { CursorLine },
|
||||
WhichKeyFloat { bg = Normal.bg.li(15) },
|
||||
DiagnosticError { fg = red },
|
||||
DiagnosticWarn { fg = orange },
|
||||
DiagnosticInfo { fg = cyan },
|
||||
Pmenu { bg = Normal.bg.li(20) },
|
||||
PmenuSel { bg = Normal.bg.li(25).sa(20) },
|
||||
Error { bg = red.da(25), fg = Normal.bg },
|
||||
ErrorMsg { Error },
|
||||
MatchParen { fg = hot_pink, gui = "bold" },
|
||||
SpecialKey { fg = red },
|
||||
Directory { fg = cyan },
|
||||
Title { fg = fuchsia, gui = "bold" },
|
||||
Conceal { bg = blue.da(40).de(50) },
|
||||
SpellBad { fg = red, gui = "underline" },
|
||||
SpellRare { fg = Type.fg, gui = "underline" },
|
||||
SpellLocal { fg = DiagnosticInfo.fg, gui = "underline" },
|
||||
SpellCap { fg = String.fg, gui = "underline" },
|
||||
local M = {}
|
||||
|
||||
local default = {
|
||||
dark = {
|
||||
base = hsl(210, 40, 75),
|
||||
},
|
||||
light = {
|
||||
base = hsl(210, 50, 35),
|
||||
}
|
||||
}
|
||||
end)
|
||||
|
||||
return theme
|
||||
function M.setup(options)
|
||||
if options then
|
||||
M.options = options
|
||||
else
|
||||
M.options = default
|
||||
end
|
||||
end
|
||||
|
||||
-- vi:nowrap:number
|
||||
return M
|
||||
|
73
lua/lupancolors/lupandark.lua
Normal file
73
lua/lupancolors/lupandark.lua
Normal file
@ -0,0 +1,73 @@
|
||||
local lush = require('lush')
|
||||
local hsl = lush.hsl
|
||||
|
||||
local base = require('lupancolors.lupan').options.dark.base
|
||||
|
||||
---@diagnostic disable: undefined-global
|
||||
local theme = lush(function()
|
||||
local red = base.hue(0)
|
||||
local orange = base.hue(30)
|
||||
local yellow = base.hue(60)
|
||||
local yellow_green = base.hue(90)
|
||||
local green = base.hue(120)
|
||||
local aquamarine = base.hue(150)
|
||||
local cyan = base.hue(180)
|
||||
local blue = base.hue(210)
|
||||
local lavender = base.hue(240)
|
||||
local purple = base.hue(270)
|
||||
local fuchsia = base.hue(300)
|
||||
local hot_pink = base.hue(330)
|
||||
return {
|
||||
-- See: h highlight-groups
|
||||
Normal { bg = base.de(65).da(75), fg = base.de(25) },
|
||||
CursorLine { bg = Normal.bg.li(10) },
|
||||
Visual { bg = Normal.bg.sa(20).li(20) },
|
||||
Comment { fg = base.de(75).da(20) },
|
||||
CursorColumn { CursorLine },
|
||||
LineNr { Comment, gui = "italic" },
|
||||
CursorLineNr { fg = blue, bg = CursorLine.bg, gui = "italic" },
|
||||
Search { bg = yellow, fg = Normal.bg },
|
||||
IncSearch { bg = yellow_green, fg = Normal.bg },
|
||||
String { fg = blue },
|
||||
PreProc { fg = lavender },
|
||||
Statement { fg = orange },
|
||||
Type { fg = yellow },
|
||||
Identifier { fg = Normal.fg },
|
||||
Function { fg = green },
|
||||
Operator { fg = aquamarine },
|
||||
Special { fg = purple },
|
||||
Constant { fg = cyan },
|
||||
NonText { fg = Normal.bg.li(10) },
|
||||
DiffAdd { fg = green },
|
||||
DiffDelete { fg = red },
|
||||
diffRemoved { fg = red },
|
||||
DiffChange { fg = blue },
|
||||
diffChanged { fg = blue },
|
||||
SignColumn { Normal },
|
||||
diffAdded { DiffAdd },
|
||||
MoreMsg { fg = green, gui = "bold" },
|
||||
Question { fg = green, gui = "bold" },
|
||||
TelescopeSelection { CursorLine },
|
||||
WhichKeyFloat { bg = Normal.bg.li(15) },
|
||||
DiagnosticError { fg = red },
|
||||
DiagnosticWarn { fg = orange },
|
||||
DiagnosticInfo { fg = cyan },
|
||||
Pmenu { bg = Normal.bg.li(20) },
|
||||
PmenuSel { bg = Normal.bg.li(25).sa(20) },
|
||||
Error { bg = red.da(25), fg = Normal.bg },
|
||||
ErrorMsg { Error },
|
||||
MatchParen { fg = hot_pink, gui = "bold" },
|
||||
SpecialKey { fg = red },
|
||||
Directory { fg = cyan },
|
||||
Title { fg = fuchsia, gui = "bold" },
|
||||
Conceal { bg = blue.da(40).de(50) },
|
||||
SpellBad { fg = red, gui = "underline" },
|
||||
SpellRare { fg = Type.fg, gui = "underline" },
|
||||
SpellLocal { fg = DiagnosticInfo.fg, gui = "underline" },
|
||||
SpellCap { fg = String.fg, gui = "underline" },
|
||||
}
|
||||
end)
|
||||
|
||||
return theme
|
||||
|
||||
-- vi:nowrap:number
|
@ -1,9 +1,10 @@
|
||||
local lush = require('lush')
|
||||
local hsl = lush.hsl -- We'll use hsl a lot so its nice to bind it separately
|
||||
local hsl = lush.hsl
|
||||
|
||||
local base = require('lupancolors.lupan').options.light.base
|
||||
|
||||
---@diagnostic disable: undefined-global
|
||||
local theme = lush(function()
|
||||
local base = hsl(210, 50, 35)
|
||||
local red = base.hue(0)
|
||||
local orange = base.hue(30)
|
||||
local yellow = base.hue(60)
|
||||
@ -18,7 +19,7 @@ local theme = lush(function()
|
||||
local hot_pink = base.hue(330)
|
||||
return {
|
||||
-- See: h highlight-groups
|
||||
Normal { bg = base.de(70).li(90), fg = base.de(25) },
|
||||
Normal { bg = base.de(70).li(90), fg = base.de(75) },
|
||||
CursorLine { bg = Normal.bg.da(4) },
|
||||
Visual { bg = base.de(55).li(65) },
|
||||
Comment { fg = base.de(60).li(20) },
|
||||
@ -67,7 +68,6 @@ local theme = lush(function()
|
||||
}
|
||||
end)
|
||||
|
||||
|
||||
return theme
|
||||
|
||||
-- vi:nowrap:number
|
||||
|
Loading…
x
Reference in New Issue
Block a user