VS-Dark theme for nvim
This commit is contained in:
1 parent
416e87fa8a
commit
d6b10c0584
5 files changed
+41
-31
No files matched your search
@@ -45,7 +45,7 @@ vim.opt.fillchars = {
|
||||
}
|
||||
vim.api.nvim_create_autocmd("ColorScheme", {
|
||||
callback = function()
|
||||
vim.api.nvim_set_hl(0, "WinSeparator", { fg = "#3b4261" })
|
||||
vim.api.nvim_set_hl(0, "WinSeparator", { fg = "#444444" })
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
return {
|
||||
-- REALLY Dark Theme (near-black koda)
|
||||
-- Visual Studio-style dark theme (VS Code "Dark+", via vscode.nvim),
|
||||
-- on a near-black #090909 background
|
||||
--
|
||||
-- Terminal Neovim and Neovide (the desktop GUI app) render the same
|
||||
-- highlight groups, so the theme itself needs nothing
|
||||
@@ -7,10 +8,16 @@ return {
|
||||
-- in two (see smear-cursor.lua and init.lua), since a terminal and a GPU-rendered GUI window have
|
||||
-- different ways of drawing one.
|
||||
{
|
||||
"oskarnurm/koda.nvim",
|
||||
"Mofiqul/vscode.nvim",
|
||||
priority = 1000,
|
||||
config = function()
|
||||
require("koda").setup({
|
||||
-- vscode.nvim picks its dark or light palette from 'background',
|
||||
-- so pin it before asking for colors below.
|
||||
vim.o.background = "dark"
|
||||
local c = require("vscode.colors").get_colors()
|
||||
|
||||
require("vscode").setup({
|
||||
style = "dark",
|
||||
-- Terminal only (see the "not Neovide" comment on the setting
|
||||
-- above): clears highlight-group backgrounds to NONE so
|
||||
-- whatever the *terminal emulator* draws behind Neovim shows
|
||||
@@ -23,27 +30,32 @@ return {
|
||||
-- Neovide doesn't use this option at all -- see
|
||||
-- vim.g.neovide_opacity in init.lua for its equivalent.
|
||||
transparent = not vim.g.neovide,
|
||||
colors = {
|
||||
-- koda's own "dark" variant defaults to #101010 -- nudged a
|
||||
-- touch further down to match the old pure-black background.
|
||||
bg = "#090909",
|
||||
line = "#1a1a1a",
|
||||
-- Near-black background instead of VS Code's #1F1F1F. (With
|
||||
-- `transparent` on, vscode.nvim forces vscBack to NONE, so this
|
||||
-- shows in Neovide; in a terminal the terminal's own background
|
||||
-- shows instead -- set that to #090909 to match.) The cursor-line
|
||||
-- shade and active-tab background are nudged to fit it.
|
||||
color_overrides = {
|
||||
vscBack = "#090909",
|
||||
vscCursorDarkDark = "#1a1a1a",
|
||||
vscTabCurrent = vim.g.neovide and "#090909" or "NONE",
|
||||
},
|
||||
on_highlights = function(hl, c)
|
||||
-- koda has no dedicated "hint" color; c.cyan is the closest
|
||||
-- hue match to the dark-teal hint background below.
|
||||
hl.DiagnosticVirtualTextError = { bg = "#351010", fg = c.danger }
|
||||
hl.DiagnosticVirtualTextWarn = { bg = "#35280b", fg = c.warning }
|
||||
hl.DiagnosticVirtualTextInfo = { bg = "#0b2035", fg = c.info }
|
||||
hl.DiagnosticVirtualTextHint = { bg = "#0b3528", fg = c.cyan }
|
||||
group_overrides = {
|
||||
-- Tinted backgrounds behind diagnostic virtual text/lines.
|
||||
-- vscode.nvim's own Hint color is the same blue as Info, so
|
||||
-- hints use the palette's teal to match the dark-teal tint.
|
||||
DiagnosticVirtualTextError = { bg = "#351010", fg = c.vscRed },
|
||||
DiagnosticVirtualTextWarn = { bg = "#35280b", fg = c.vscYellow },
|
||||
DiagnosticVirtualTextInfo = { bg = "#0b2035", fg = c.vscBlue },
|
||||
DiagnosticVirtualTextHint = { bg = "#0b3528", fg = c.vscBlueGreen },
|
||||
|
||||
hl.DiagnosticVirtualLinesError = { bg = "#351010", fg = c.danger }
|
||||
hl.DiagnosticVirtualLinesWarn = { bg = "#35280b", fg = c.warning }
|
||||
hl.DiagnosticVirtualLinesInfo = { bg = "#0b2035", fg = c.info }
|
||||
hl.DiagnosticVirtualLinesHint = { bg = "#0b3528", fg = c.cyan }
|
||||
end,
|
||||
DiagnosticVirtualLinesError = { bg = "#351010", fg = c.vscRed },
|
||||
DiagnosticVirtualLinesWarn = { bg = "#35280b", fg = c.vscYellow },
|
||||
DiagnosticVirtualLinesInfo = { bg = "#0b2035", fg = c.vscBlue },
|
||||
DiagnosticVirtualLinesHint = { bg = "#0b3528", fg = c.vscBlueGreen },
|
||||
},
|
||||
})
|
||||
vim.cmd.colorscheme("koda-dark")
|
||||
vim.cmd.colorscheme("vscode")
|
||||
end,
|
||||
},
|
||||
}
|
||||
@@ -6,12 +6,10 @@ return {
|
||||
config = function()
|
||||
require("lualine").setup({
|
||||
options = {
|
||||
-- "auto" derives lualine's colors from the active colorscheme's
|
||||
-- own highlight groups -- koda doesn't ship a hand-built lualine
|
||||
-- theme the way some more established colorschemes do, so this
|
||||
-- is what keeps the statusline actually matching it instead of
|
||||
-- falling back to lualine's generic default palette.
|
||||
theme = "auto",
|
||||
-- vscode.nvim ships a hand-built lualine theme, so use it
|
||||
-- instead of "auto" (which would derive colors from the
|
||||
-- active colorscheme's highlight groups).
|
||||
theme = "vscode",
|
||||
-- Powerline private-use-area glyphs (E0B0-E0B3). This needs
|
||||
-- the terminal's font actually set to the PATCHED family
|
||||
-- (e.g. "JetBrainsMono Nerd Font" / "CaskaydiaCove Nerd
|
||||
|
||||
@@ -4,7 +4,7 @@ return {
|
||||
"rcarriga/nvim-notify",
|
||||
config = function()
|
||||
require("notify").setup({
|
||||
background_colour = "#000000",
|
||||
background_colour = "#090909",
|
||||
timeout = 3000,
|
||||
-- Stack upward from the bottom instead of down from the top
|
||||
-- (nvim-notify anchors to the right by default either way),
|
||||
|
||||
Reference in new issue
Block a user