From a144d1fda91249d4d8aec0f8ce9ad367e48dfb78 Mon Sep 17 00:00:00 2001 From: Daniil Tsivinsky Date: Sun, 15 Mar 2026 22:33:29 +0300 Subject: [PATCH] neovim: install catppuccin theme --- config/.config/ghostty/config | 2 +- neovim/.config/nvim/after/plugin/options.lua | 3 +- .../nvim/colors/apple_system_colors_light.lua | 1 + neovim/.config/nvim/init.lua | 8 +++ neovim/.config/nvim/lua/theme.lua | 67 +++++++++++++++++++ neovim/.config/nvim/nvim-pack-lock.json | 4 ++ 6 files changed, 83 insertions(+), 2 deletions(-) create mode 100644 neovim/.config/nvim/colors/apple_system_colors_light.lua create mode 100644 neovim/.config/nvim/lua/theme.lua diff --git a/config/.config/ghostty/config b/config/.config/ghostty/config index 325f304..35ce10c 100644 --- a/config/.config/ghostty/config +++ b/config/.config/ghostty/config @@ -6,7 +6,7 @@ font-feature = "-calt" font-feature = "-dlig" font-size = "16" fullscreen = false -theme = "Gruvbox Dark" +theme = "light:Apple System Colors Light,dark:Gruvbox Dark" shell-integration-features = "no-cursor,no-title" cursor-style = "block" cursor-style-blink = false diff --git a/neovim/.config/nvim/after/plugin/options.lua b/neovim/.config/nvim/after/plugin/options.lua index 0d16675..1301caa 100644 --- a/neovim/.config/nvim/after/plugin/options.lua +++ b/neovim/.config/nvim/after/plugin/options.lua @@ -40,4 +40,5 @@ vim.opt.listchars = { multispace = "·", tab = ">~", leadmultispace = "┊ " } vim.opt.spelllang = "en_us,ru" -vim.cmd.colorscheme("retrobox") +vim.opt.background = "light" +vim.cmd.colorscheme("catppuccin-latte") diff --git a/neovim/.config/nvim/colors/apple_system_colors_light.lua b/neovim/.config/nvim/colors/apple_system_colors_light.lua new file mode 100644 index 0000000..3a25d00 --- /dev/null +++ b/neovim/.config/nvim/colors/apple_system_colors_light.lua @@ -0,0 +1 @@ +vim.g.colors_name = "apple_system_colors_light" diff --git a/neovim/.config/nvim/init.lua b/neovim/.config/nvim/init.lua index 1996877..397446c 100644 --- a/neovim/.config/nvim/init.lua +++ b/neovim/.config/nvim/init.lua @@ -54,4 +54,12 @@ pack.add({ }, }) +pack.add({ + src = "catppuccin/nvim", + name = "catppuccin", +}) +require("catppuccin").setup({}) + +require("theme").setup() + pack.register_user_commands() diff --git a/neovim/.config/nvim/lua/theme.lua b/neovim/.config/nvim/lua/theme.lua new file mode 100644 index 0000000..5b9c7f1 --- /dev/null +++ b/neovim/.config/nvim/lua/theme.lua @@ -0,0 +1,67 @@ +local M = { + name = "apple_system_colors_light", +} + +M.palette = { + black = "#1a1a1a", + red_dark = "#cc372e", + green_dark = "#26a439", + yellow_dark = "#cdac08", + blue_dark = "#0869cb", + purple_dark = "#9647bf", + cyan_dark = "#479ec2", + gray_light = "#98989d", + gray_dark = "#464646", + red_light = "#ff453a", + green_light = "#32d74b", + yellow_light = "#e5bc00", + blue_light = "#0a84ff", + purple_light = "#bf5af2", + cyan_light = "#69c9f2", + white = "#ffffff", + background = "#feffff", + foreground = "#000000", + cursor_color = "#98989d", + cursor_text = "#ffffff", + selection_background = "#abd8ff", + selection_foreground = "#000000", +} + +local function hl(group, opts) + vim.api.nvim_set_hl(0, group, opts) +end + +function M.setup() + vim.g.colors_name = M.name + + -- Basic UI groups + hl("Normal", { fg = M.palette.foreground, bg = M.palette.background }) + hl("NormalNC", { fg = M.palette.foreground, bg = M.palette.background }) + hl("CursorLine", { bg = M.palette.cursor_color, fg = M.palette.cursor_text }) + hl("Visual", { bg = M.palette.selection_background }) + hl("LineNr", { fg = M.palette.gray_light, bg = M.palette.background }) + hl("CursorLineNr", { fg = M.palette.cyan_dark, bg = M.palette.background }) + + -- Syntax groups + hl("Comment", { fg = M.palette.gray_light, italic = true }) + hl("Constant", { fg = M.palette.red_dark }) + hl("String", { fg = M.palette.red_light }) + hl("Identifier", { fg = M.palette.blue_dark }) + hl("Statement", { fg = M.palette.green_dark }) + hl("PreProc", { fg = M.palette.red_dark }) + hl("Type", { fg = M.palette.purple_dark }) + hl("Special", { fg = M.palette.gray_dark }) + hl("Underlined", { underline = true }) + + -- Diagnostic groups + hl("DiagnosticError", { fg = M.palette.red_dark }) + hl("DiagnosticWarn", { fg = M.palette.yellow_dark }) + hl("DiagnosticInfo", { fg = M.palette.cyan_dark }) + hl("DiagnosticHint", { fg = M.palette.blue_dark }) + hl("DiagnosticUnderlineError", { sp = M.palette.red_dark, undercurl = true }) + hl("DiagnosticUnderlineWarn", { sp = M.palette.yellow_dark, undercurl = true }) + hl("DiagnosticUnderlineInfo", { sp = M.palette.cyan_dark, undercurl = true }) + hl("DiagnosticUnderlineHint", { sp = M.palette.blue_dark, undercurl = true }) +end + +return M diff --git a/neovim/.config/nvim/nvim-pack-lock.json b/neovim/.config/nvim/nvim-pack-lock.json index bc8995b..aff8517 100644 --- a/neovim/.config/nvim/nvim-pack-lock.json +++ b/neovim/.config/nvim/nvim-pack-lock.json @@ -12,6 +12,10 @@ "rev": "27f7d753990c8d79bdefe75be0094e7e86eabf16", "src": "https://github.com/b0o/SchemaStore.nvim" }, + "catppuccin": { + "rev": "384f304c8b04664c9e0091fbfb3923c5f97c1bcf", + "src": "https://github.com/catppuccin/nvim" + }, "cmp-buffer": { "rev": "b74fab3656eea9de20a9b8116afa3cfc4ec09657", "src": "https://github.com/hrsh7th/cmp-buffer"