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
+2
-2
@@ -122,7 +122,7 @@ The installer asks which Neovim frontend(s) to set up:
|
||||
|
||||
There's only one config either way (`config/nvim/`) — Neovide reads the exact same `init.lua`, so keymaps, plugins, and the LSP setup are all identical between the two. Two things differ between them — cursor animation and background transparency — and the config detects which frontend it's running under (`vim.g.neovide`) and picks the right mechanism for each automatically:
|
||||
|
||||
- **Terminal**: [`smear-cursor.nvim`](https://github.com/sphamba/smear-cursor.nvim) draws the animated cursor trail — a terminal has no native equivalent, so this fills that gap. `koda.nvim`'s `transparent` option is on, clearing highlight-group backgrounds so whatever the *terminal emulator* draws behind Neovim shows through — including a background image, if your terminal supports one (e.g. kitty's own `background_image` setting). That's a terminal-level feature this config has no reach into; without it configured on the terminal side, transparency here just shows the terminal's normal background color, which is a harmless no-op look.
|
||||
- **Terminal**: [`smear-cursor.nvim`](https://github.com/sphamba/smear-cursor.nvim) draws the animated cursor trail — a terminal has no native equivalent, so this fills that gap. `vscode.nvim`'s `transparent` option is on, clearing highlight-group backgrounds so whatever the *terminal emulator* draws behind Neovim shows through — including a background image, if your terminal supports one (e.g. kitty's own `background_image` setting). That's a terminal-level feature this config has no reach into; without it configured on the terminal side, transparency here just shows the terminal's normal background color, which is a harmless no-op look.
|
||||
- **Neovide**: uses Neovide's own built-in, GPU-accelerated cursor VFX (`railgun` mode) instead of smear-cursor.nvim — running both at once would be two different animation systems fighting over the same cursor, so smear-cursor.nvim doesn't even load when `vim.g.neovide` is set. For background: Neovide has no background-image setting at all — two attempts to add one ([neovide/neovide#2419](https://github.com/neovide/neovide/pull/2419), [#3067](https://github.com/neovide/neovide/pull/3067)) were both closed as abandoned, most recently in October 2025; the feature request itself ([neovide/neovide#342](https://github.com/neovide/neovide/issues/342)) is still open. `vim.g.neovide_opacity` (set to `0.9`) is the closest real substitute — it makes the whole window translucent, so on a compositing window manager, whatever's behind it (your desktop wallpaper, if Neovide isn't covering the whole screen) blends through. Adjust or remove it in `init.lua` to taste.
|
||||
|
||||
Once installed, launch the desktop app with `neovide` from a terminal — if that command isn't found right after setup, open a new shell first (a fresh `rustup` install updates `PATH` via shell startup files, which the setup script's own shell won't have re-read).
|
||||
@@ -158,7 +158,7 @@ Once installed, launch the desktop app with `neovide` from a terminal — if tha
|
||||
|
||||
## Look & feel
|
||||
|
||||
- **Theme**: [`koda.nvim`](https://github.com/oskarnurm/koda.nvim) (dark variant), nudged to a near-black background, with custom colors for error/warn/info/hint diagnostic virtual lines.
|
||||
- **Theme**: [`vscode.nvim`](https://github.com/Mofiqul/vscode.nvim) (dark variant, VS Code Dark+ palette), on a near-black `#090909` background, with custom tinted backgrounds for error/warn/info/hint diagnostic virtual lines. lualine uses the plugin's own `vscode` theme.
|
||||
- **Cursor animation**: an animated cursor trail in both frontends, via different mechanisms — see [Terminal vs. desktop (Neovide)](#terminal-vs-desktop-neovide) for which plugin does what and why.
|
||||
- **Dashboard**: `alpha-nvim` start screen with quick actions — find file, recent files, live grep, new file, edit config, quit.
|
||||
- **Statusline**: `lualine`, styled with true Powerline arrow separators (the seamless, edge-to-edge kind — between sections, a thinner version between components within a section). Left to right:
|
||||
|
||||
@@ -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