forked from scottmckendry/cyberdream.nvim
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
45825ee
commit 540aa0b
Showing
5 changed files
with
211 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
local M = {} | ||
|
||
M.default = { | ||
bg = "#16181a", | ||
bgHighlight = "#3c4048", | ||
fg = "#ffffff", | ||
grey = "#5c6370", | ||
blue = "#498efd", | ||
blue2 = "#109bff", | ||
green = "#66ff00", | ||
cyan = "#00ffff", | ||
red = "#fb466e", | ||
yellow = "#fff900", | ||
magenta = "#ff00ff", | ||
pink = "#fea1dd", | ||
orange = "#ff6c30", | ||
purple = "#ca71ff", | ||
} | ||
|
||
return M |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
local M = {} | ||
|
||
M.options = {} | ||
|
||
return M |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
local theme = require("cyberdream.theme") | ||
-- local config = require("cyberdream.config") | ||
local util = require("cyberdream.util") | ||
|
||
local M = {} | ||
|
||
M.colorscheme = util.load(theme.setup()) | ||
|
||
return M |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
local colours = require("cyberdream.colours") | ||
|
||
local M = {} | ||
--- | ||
---@class Highlight | ||
---@field fg string|nil | ||
---@field bg string|nil | ||
---@field sp string|nil | ||
---@field style string|nil | ||
---@field link string|nil | ||
|
||
---@alias Highlights table<string, Highlight> | ||
|
||
---@return Theme | ||
function M.setup() | ||
-- Placeholders for now, will add config options later | ||
local config = require("cyberdream.config") | ||
local options = config.options | ||
|
||
---@class Theme | ||
---@field highlights Highlights | ||
local theme = { | ||
config = options, | ||
colours = colours.default, | ||
} | ||
|
||
local t = theme.colours | ||
|
||
theme.highlights = { | ||
Comment = { fg = t.grey }, | ||
ColorColumn = { bg = t.bg }, | ||
Conceal = { fg = t.grey }, | ||
Cursor = { fg = t.bg, bg = t.fg }, | ||
ICursor = { fg = t.bg, bg = t.fg }, | ||
CursorIM = { fg = t.bg, bg = t.fg }, | ||
CursorColumn = { bg = t.bgHighlight }, | ||
CursorLine = { bg = t.bgHighlight }, | ||
Directory = { fg = t.blue }, | ||
DiffAdd = { fg = t.green }, | ||
DiffChange = { fg = t.yellow }, | ||
DiffDelete = { fg = t.red }, | ||
DiffText = { fg = t.blue }, | ||
EndOfBuffer = { fg = t.bg }, | ||
ErrorMsg = { fg = t.red }, | ||
VertSplit = { fg = t.none, bg = t.bg }, | ||
WinSeperator = { fg = t.none, bg = t.bg }, | ||
Folded = { fg = t.grey, bg = t.bgHighlight }, | ||
FoldColumn = { fg = t.grey, bg = t.bgHighlight }, | ||
SignColumn = { fg = t.grey, bg = t.bg }, | ||
SignColumnSB = { fg = t.grey, bg = t.bg }, | ||
Substitute = { fg = t.red, bg = t.bgHighlight }, | ||
LineNr = { fg = t.bgHighlight }, | ||
CursorLineNr = { fg = t.grey }, | ||
MatchParen = { fg = t.orange, bg = t.bgHighlight }, | ||
ModeMsg = { fg = t.fg }, | ||
MsgArea = { fg = t.fg }, | ||
MoreMsg = { fg = t.fg }, | ||
NonText = { fg = t.grey }, | ||
Normal = { fg = t.fg, bg = t.bg }, | ||
NormalNC = { fg = t.fg, bg = t.bg }, | ||
NormalFloat = { fg = t.fg, bg = t.bgHighlight }, | ||
FloatTitle = { fg = t.fg, bg = t.bgHighlight }, | ||
FloatBorder = { fg = t.grey, bg = t.bgHighlight }, | ||
Pmenu = { fg = t.fg, bg = t.bgHighlight }, | ||
PmenuSel = { fg = t.fg, bg = t.bgHighlight }, | ||
PmenuSbar = { fg = t.none, bg = t.bgHighlight }, | ||
PmenuThumb = { fg = t.none, bg = t.bgHighlight }, | ||
Question = { fg = t.yellow }, | ||
QuickFixLine = { fg = t.bg, bg = t.blue }, | ||
Search = { fg = t.bg, bg = t.yellow }, | ||
IncSearch = { fg = t.bg, bg = t.yellow }, | ||
CurSearch = { fg = t.bg, bg = t.yellow }, | ||
SpecialKey = { fg = t.grey }, | ||
SpellBad = { fg = t.red, style = "undercurl" }, | ||
SpellCap = { fg = t.yellow, style = "undercurl" }, | ||
SpellLocal = { fg = t.blue, style = "undercurl" }, | ||
SpellRare = { fg = t.purple, style = "undercurl" }, | ||
StatusLine = { fg = t.fg, bg = t.bgHighlight }, | ||
StatusLineNC = { fg = t.grey, bg = t.bgHighlight }, | ||
TabLine = { fg = t.grey, bg = t.bgHighlight }, | ||
TabLineFill = { fg = t.grey, bg = t.bgHighlight }, | ||
TabLineSel = { fg = t.fg, bg = t.bgHighlight }, | ||
Title = { fg = t.fg }, | ||
Visual = { fg = t.bg, bg = t.blue }, | ||
VisualNOS = { fg = t.bg, bg = t.blue }, | ||
WarningMsg = { fg = t.orange }, | ||
Whitespace = { fg = t.grey }, | ||
WildMenu = { fg = t.bg, bg = t.blue }, | ||
|
||
Constant = { fg = t.blue }, | ||
String = { fg = t.green }, | ||
Character = { fg = t.green }, | ||
|
||
Number = { fg = t.purple }, | ||
Boolean = { fg = t.purple }, | ||
Float = { fg = t.purple }, | ||
|
||
Identifier = { fg = t.blue }, | ||
Function = { fg = t.blue }, | ||
Statement = { fg = t.magenta }, | ||
Conditional = { fg = t.pink }, | ||
Repeat = { fg = t.yellow }, | ||
Label = { fg = t.yellow }, | ||
Operator = { fg = t.pink }, | ||
Keyword = { fg = t.orange }, | ||
Exception = { fg = t.pink }, | ||
PreProc = { fg = t.cyan }, | ||
Include = { fg = t.cyan }, | ||
Define = { fg = t.cyan }, | ||
Macro = { fg = t.cyan }, | ||
PreCondit = { fg = t.cyan }, | ||
|
||
Type = { fg = t.yellow }, | ||
StorageClass = { fg = t.yellow }, | ||
Structure = { fg = t.yellow }, | ||
Typedef = { fg = t.yellow }, | ||
|
||
Special = { fg = t.orange }, | ||
SpecialChar = { fg = t.orange }, | ||
Tag = { fg = t.orange }, | ||
Delimiter = { fg = t.orange }, | ||
SpecialComment = { fg = t.orange }, | ||
Debug = { fg = t.orange }, | ||
|
||
Underlined = { style = "underline" }, | ||
Bold = { style = "bold" }, | ||
Italic = { style = "italic" }, | ||
|
||
Error = { fg = t.red }, | ||
Todo = { fg = t.purple, style = "bold" }, | ||
|
||
qfLineNr = { fg = t.grey }, | ||
qfFileName = { fg = t.blue }, | ||
|
||
htmlH1 = { fg = t.orange, bold = true }, | ||
htmlH2 = { fg = t.orange, bold = true }, | ||
|
||
mkdCodeDelimiter = { fg = t.grey }, | ||
mkdCodeStart = { fg = t.grey }, | ||
mkdCodeEnd = { fg = t.grey }, | ||
} | ||
return theme | ||
end | ||
|
||
return M |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
local ts = require("cyberdream.treesitter") | ||
local M = {} | ||
|
||
---@param theme Theme | ||
function M.load(theme) | ||
-- only needed to clear when not the default colorscheme | ||
if vim.g.colors_name then | ||
vim.cmd("hi clear") | ||
end | ||
|
||
vim.o.termguicolors = true | ||
vim.g.colors_name = "cyberdream" | ||
|
||
if ts.new_style() then | ||
for group, colors in pairs(ts.defaults) do | ||
if not theme.highlights[group] then | ||
M.highlight(group, colors) | ||
end | ||
end | ||
end | ||
|
||
M.syntax(theme.highlights) | ||
|
||
-- vim.api.nvim_set_hl_ns(M.ns) | ||
if theme.config.terminal_colours then | ||
M.terminal(theme.colours) | ||
end | ||
|
||
M.autocmds(theme.config) | ||
end | ||
|
||
return M |