2023-03-20 11:57:58 -07:00
|
|
|
-- Eryn Wells <eryn@erynwells.me>
|
|
|
|
|
|
|
|
function reloadColorscheme(colorschemeName)
|
2023-06-17 12:52:45 -07:00
|
|
|
if colorschemeName == nil then
|
2023-03-20 11:57:58 -07:00
|
|
|
vim.cmd [[
|
2023-06-17 12:52:45 -07:00
|
|
|
highlight clear
|
2023-03-20 11:57:58 -07:00
|
|
|
]]
|
2023-06-17 12:52:45 -07:00
|
|
|
else
|
|
|
|
vim.cmd {
|
|
|
|
cmd = "colorscheme",
|
|
|
|
args = {colorschemeName},
|
|
|
|
}
|
2023-03-20 11:57:58 -07:00
|
|
|
end
|
|
|
|
|
2023-06-17 12:52:45 -07:00
|
|
|
-- Make some bespoke adjustments for my cursor and line length highlights
|
|
|
|
vim.cmd [[
|
|
|
|
highlight ColorColumn cterm=NONE ctermbg=Black
|
|
|
|
highlight CursorColumn cterm=NONE ctermbg=Black
|
|
|
|
highlight CursorLine cterm=NONE ctermbg=Black
|
|
|
|
highlight CursorLineNr cterm=bold ctermfg=White ctermbg=Black
|
|
|
|
highlight LineNr ctermfg=DarkGray
|
|
|
|
]]
|
|
|
|
|
|
|
|
-- Allow using GUI style colors (#RRGGBB hex codes) in color terminals if we
|
2023-07-11 16:08:20 -07:00
|
|
|
-- know it can do it. This is required for most modern color themes. Apple's
|
|
|
|
-- Terminal.app doesn't have True Color support though, so make sure it's
|
|
|
|
-- off for that.
|
|
|
|
vim.g.termguicolors = not vim.env.TERM_PROGRAM == "Apple_Terminal"
|
2023-06-17 12:52:45 -07:00
|
|
|
|
2023-03-20 11:57:58 -07:00
|
|
|
if vim.g.colors_name == "witchhazel" then
|
|
|
|
vim.cmd [[
|
|
|
|
highlight! default link LineNr CursorLineNr
|
|
|
|
highlight! default link CursorLineNr CursorLine
|
|
|
|
]]
|
|
|
|
elseif vim.g.colors_name == "dracula" then
|
|
|
|
vim.cmd [[
|
|
|
|
highlight CursorLineNr guibg=#44475a
|
|
|
|
]]
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2023-06-20 11:13:09 -07:00
|
|
|
if vim.env.TERM_PROGRAM == "Apple_Terminal" then
|
|
|
|
reloadColorscheme(nil)
|
|
|
|
else
|
|
|
|
reloadColorscheme("dracula")
|
|
|
|
end
|