local colors = {
	bg		= "#0A0A0A",
	fg		= "#C0C0C0",
	borderfg	= "#444444",--need to see if not shit
	floatbg		= "#0C0C0C",--same
	separatorfg	= "#262626",--same
	cursorlinebg	= "#111111",
	visualbg	= "#333333",
	statuslinebg	= "#1A1A1A",
	linenrfg	= "#505050",
	cursorlinenrfg	= "#FFE94D",
	commentfg	= "#7FAAFF",
	identifierfg	= "#FF4D6D",
	statementfg	= "#A64DFF",
	functionfg	= "#8EFF8E",
	constantfg	= "#FFE94D",
	typefg		= "#508DFF",
	stringfg	= "#66FFFF",
	keywordfg	= "#D888FF",
	pmenubg		= "#111111",
	pmenufg		= "#C0C0C0",
	pmenuselbg	= "#A64DFF",
	pmenuselfg	= "#0A0A0A",
}

local transparent = false

local function set_highlight(group, opts)
	vim.api.nvim_set_hl(0, group, opts)
end

local function apply_theme()
	vim.opt.background = "dark"
	vim.cmd("highlight clear")
	vim.cmd("syntax reset")
	vim.g.colors_name = "vhs"

	local bg = transparent and "NONE" or colors.bg
	local floatbg = transparent and "NONE" or colors.floatbg
	local cursorlinebg = transparent and "NONE" or colors.cursorlinebg
	local visualbg = transparent and "NONE" or colors.visualbg
	local statuslinebg = transparent and "NONE" or colors.statuslinebg
	local pmenubg = transparent and "NONE" or colors.pmenubg
	local pmenuselbg = transparent and "NONE" or colors.pmenuselbg

	set_highlight("Normal", { fg = colors.fg, bg = bg})
	set_highlight("LineNr", { fg = colors.linenrfg, bg = bg})
	set_highlight("CursorLineNr", { fg = colors.cursorlinerfg , bg = bg})
	set_highlight("Comment", { fg = colors.commentfg, italic = true})
	set_highlight("Identifier", { fg = colors.identifierfg})
	set_highlight("Statement", { fg = colors.statementfg})
	set_highlight("Function", { fg = colors.functionfg})
	set_highlight("Constant", { fg = colors.constantfg})
	set_highlight("Type", { fg = colors.typefg})
	set_highlight("String", { fg = colors.stringfg})
	set_highlight("Keyword", { fg = colors.keywordfg})

	set_highlight("Pmenu", { fg = colors.pmenufg, bg = pmenubg})
	set_highlight("PmenuSel", { fg = colors.pmenuselfg, bg = pmenuselbg})
	
	set_highlight("Visual", { bg = visualbg })
	set_highlight("CursorLine", { bg = cursorlinebg })
	set_highlight("StatusLine", { fg = colors.functionfg, bg = statuslinebg})
	
	set_highlight("NormalFloat", {fg = colors.fg, bg = floatbg})
	set_highlight("FloatBorder", {fg = colors.borderfg, bg = floatbg})
	set_highlight("WinSeparator", {fg = colors.separatorfg, bg = bg})
	set_highlight("VertSplit", {fg = colors.separatorfg, bg = bg})
end

apply_theme()

