You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
2.4 KiB
Lua

function ColorMyPencils(color)
color = color or "base16-gruvbox-dark-hard"
-- color = color or "default"
vim.cmd.colorscheme(color)
vim.api.nvim_set_hl(0, "Normal", { ctermbg="none" })
vim.api.nvim_set_hl(0, "NormalFloat", { link="Normal" })
vim.api.nvim_set_hl(0, "NonText", { link="Normal" })
vim.api.nvim_set_hl(0, "LineNr", { link="Normal" })
vim.api.nvim_set_hl(0, "SignColumn", { link="Normal" })
vim.api.nvim_set_hl(0, "Visual", { ctermfg=0, ctermbg=3 })
vim.api.nvim_set_hl(0, "Search", { ctermfg=4, ctermbg=3 })
vim.api.nvim_set_hl(0, "Folded", { ctermfg=2, ctermbg=0 })
-- diff colors
-- The one issue with this is you won't be as easy to tell where the diff
-- sections are if there is no transparency in the terminal.
vim.api.nvim_set_hl(0, "DiffAdd", { ctermfg=2, ctermbg=0 })
vim.api.nvim_set_hl(0, "DiffDelete", { ctermfg=1, ctermbg=0 })
vim.api.nvim_set_hl(0, "DiffChange", { ctermfg=8, ctermbg=0 })
vim.api.nvim_set_hl(0, "DiffText", { ctermfg=3, ctermbg=0 })
-- Popup menu
vim.api.nvim_set_hl(0, "Pmenu", { ctermfg=7, ctermbg=0 })
vim.api.nvim_set_hl(0, "PmenuSel", { ctermfg=0, ctermbg=8 })
-- Current line highlight and line wrap column.
vim.opt.colorcolumn = '-0'
vim.opt.cursorline = true
vim.api.nvim_set_hl(0, "ColorColumn", { ctermbg=0 })
vim.api.nvim_set_hl(0, "CursorLine",
{ ctermbg=0, underline=false })
vim.api.nvim_set_hl(0, "CursorLineNr",
{ ctermbg="none", underline=false })
vim.api.nvim_set_hl(0, "CursorLineSign",
{ ctermbg="none", underline=false })
-- Other stuff
vim.api.nvim_set_hl(0, "WinSeparator",
{ ctermfg = 3, ctermbg = "none" })
vim.api.nvim_set_hl(0, "SpellBad",
{ cterm = { undercurl = true }, ctermfg = 1, ctermbg = 0 })
-- GitSigns colors
--
-- TODO this should be moved to gitsigns.lua
-- It would have been nice to link these to 'DiffAdd', 'DiffChange', and
-- 'DiffDelete', but currently this has a transparent background, while the
-- others don't. This may change though so keep the possibility of linking
-- in mind.
vim.api.nvim_set_hl(0, "GitSignsAdd", { ctermfg=2, ctermbg="none" })
vim.api.nvim_set_hl(0, "GitSignsChange", { ctermfg=3, ctermbg="none" })
vim.api.nvim_set_hl(0, "GitSignsDelete", { ctermfg=1, ctermbg="none" })
end
ColorMyPencils()