Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use catppuccin, bye iceberg #299

Merged
merged 2 commits into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 4 additions & 24 deletions config/.config/alacritty/alacritty.toml
Original file line number Diff line number Diff line change
@@ -1,30 +1,10 @@
import = [
"~/.config/alacritty/catppuccin-frappe.toml"
]

[colors]
draw_bold_text_with_bright_colors = true

[colors.bright]
black = "#6b7089"
blue = "#91acd1"
cyan = "#95c4ce"
green = "#c0ca8e"
magenta = "#ada0d3"
red = "#e98989"
white = "#d2d4de"
yellow = "#e9b189"

[colors.normal]
black = "#161821"
blue = "#84a0c6"
cyan = "#89b8c2"
green = "#b4be82"
magenta = "#a093c7"
red = "#e27878"
white = "#c6c8d1"
yellow = "#e2a478"

[colors.primary]
background = "#161821"
foreground = "#d2d4de"

[env]
TERM = "xterm-256color"

Expand Down
75 changes: 75 additions & 0 deletions config/.config/alacritty/catppuccin-frappe.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
[colors.primary]
background = "#303446"
foreground = "#C6D0F5"
dim_foreground = "#C6D0F5"
bright_foreground = "#C6D0F5"

[colors.cursor]
text = "#303446"
cursor = "#F2D5CF"

[colors.vi_mode_cursor]
text = "#303446"
cursor = "#BABBF1"

[colors.search.matches]
foreground = "#303446"
background = "#A5ADCE"

[colors.search.focused_match]
foreground = "#303446"
background = "#A6D189"

[colors.footer_bar]
foreground = "#303446"
background = "#A5ADCE"

[colors.hints.start]
foreground = "#303446"
background = "#E5C890"

[colors.hints.end]
foreground = "#303446"
background = "#A5ADCE"

[colors.selection]
text = "#303446"
background = "#F2D5CF"

[colors.normal]
black = "#51576D"
red = "#E78284"
green = "#A6D189"
yellow = "#E5C890"
blue = "#8CAAEE"
magenta = "#F4B8E4"
cyan = "#81C8BE"
white = "#B5BFE2"

[colors.bright]
black = "#626880"
red = "#E78284"
green = "#A6D189"
yellow = "#E5C890"
blue = "#8CAAEE"
magenta = "#F4B8E4"
cyan = "#81C8BE"
white = "#A5ADCE"

[colors.dim]
black = "#51576D"
red = "#E78284"
green = "#A6D189"
yellow = "#E5C890"
blue = "#8CAAEE"
magenta = "#F4B8E4"
cyan = "#81C8BE"
white = "#B5BFE2"

[[colors.indexed_colors]]
index = 16
color = "#EF9F76"

[[colors.indexed_colors]]
index = 17
color = "#F2D5CF"
37 changes: 26 additions & 11 deletions config/.config/nvim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,17 @@ require('lazy').setup({
config = require('pluginconfig.test').setup,
},
-- Appearance
{ 'cocopon/iceberg.vim', cond = not vim.g.vscode },
{
"catppuccin/nvim",
name = "catppuccin",
cond = not vim.g.vscode,
priority = 1000,
config = function()
require("catppuccin").setup({
flavour = 'frappe',
})
end,
},
{
'nvim-lualine/lualine.nvim',
cond = not vim.g.vscode,
Expand Down Expand Up @@ -295,11 +305,12 @@ require('lazy').setup({
cond = not vim.g.vscode,
event = 'BufReadPost',
config = function()
local palette = require("colors").palette
require('scrollbar').setup({
marks = {
Search = { color_nr = '3', color = '#c57339' },
Error = { color_nr = '9', color = '#cc3768' },
Warn = { color_nr = '11', color = '#b6662d' },
Search = { color_nr = '3', color = palette.yellow },
Error = { color_nr = '9', color = palette.red },
Warn = { color_nr = '11', color = palette.peach },
},
handlers = {
cursor = true,
Expand Down Expand Up @@ -487,17 +498,18 @@ require('lazy').setup({
cond = not vim.g.vscode,
event = { 'CursorMoved', 'CursorMovedI' },
init = function()
local palette = require('colors').palette
vim.api.nvim_create_autocmd('Colorscheme', {
pattern = '*',
command = 'highlight IlluminatedWordText ctermbg=238 guibg=#33374c'
command = string.format("highlight IlluminatedWordText ctermbg=238 guibg=%s", palette.overlay0)
})
vim.api.nvim_create_autocmd('Colorscheme', {
pattern = '*',
command = 'highlight IlluminatedWordRead ctermbg=238 guibg=#33374c'
command = string.format("highlight IlluminatedWordRead ctermbg=238 guibg=%s", palette.overlay0)
})
vim.api.nvim_create_autocmd('Colorscheme', {
pattern = '*',
command = 'highlight IlluminatedWordWrite ctermbg=238 guibg=#33374c'
command = string.format("highlight IlluminatedWordWrite ctermbg=238 guibg=%s", palette.overlay0)
})
end,
config = function()
Expand All @@ -509,9 +521,10 @@ require('lazy').setup({
cond = not vim.g.vscode,
event = 'VeryLazy',
init = function()
local palette = require('colors').palette
vim.api.nvim_create_autocmd('Colorscheme', {
pattern = '*',
command = 'highlight ExtraWhitespace guibg=#e27878'
command = string.format('highlight ExtraWhitespace guibg=%s', palette.red)
})
end,
config = function()
Expand Down Expand Up @@ -651,6 +664,8 @@ if not vim.g.vscode then
end
})

local palette = require('colors').palette

-- clear bg
vim.api.nvim_create_autocmd('Colorscheme', {
pattern = '*',
Expand All @@ -675,14 +690,14 @@ if not vim.g.vscode then
-- floating
vim.api.nvim_create_autocmd('Colorscheme', {
pattern = '*',
command = 'highlight NormalFloat guibg=#1e2132'
command = string.format('highlight NormalFloat guibg=%s', palette.mantle)
})
vim.api.nvim_create_autocmd('Colorscheme', {
pattern = '*',
command = 'highlight FloatBorder guibg=#1e2132 blend=20'
command = string.format('highlight FloatBorder guibg=%s blend=20', palette.mantle)
})
vim.opt.termguicolors = true
vim.opt.winblend = 20
vim.opt.pumblend = 20
vim.cmd.colorscheme('iceberg')
vim.cmd.colorscheme('catppuccin')
end
4 changes: 2 additions & 2 deletions config/.config/nvim/lazy-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"auto-session": { "branch": "main", "commit": "3eb26b949e1b90798e84926848551046e2eb0721" },
"bufdelete.nvim": { "branch": "master", "commit": "8933abc09df6c381d47dc271b1ee5d266541448e" },
"bufferline.nvim": { "branch": "main", "commit": "6ecd37e0fa8b156099daedd2191130e083fb1490" },
"catppuccin": { "branch": "main", "commit": "045e3499d9ec8d84635fb08877ae44fd33f6a38d" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" },
"cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" },
Expand All @@ -16,10 +17,9 @@
"flit.nvim": { "branch": "main", "commit": "f4e9af572a62c808c8de214da672f2a115a98c35" },
"git.nvim": { "branch": "main", "commit": "741696687486f25f8b73d9e4c76ab2ede9998f39" },
"gitsigns.nvim": { "branch": "main", "commit": "af0f583cd35286dd6f0e3ed52622728703237e50" },
"iceberg.vim": { "branch": "master", "commit": "e01ac08c2202e7544531f4d806f6893539da6471" },
"indent-blankline.nvim": { "branch": "master", "commit": "29be0919b91fb59eca9e90690d76014233392bef" },
"lasterisk.nvim": { "branch": "main", "commit": "bbcfcaeca50f686e338a03386e41645fc3305f44" },
"lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" },
"lazy.nvim": { "branch": "main", "commit": "83493db50a434a4c5c648faf41e2ead80f96e478" },
"leap.nvim": { "branch": "main", "commit": "b6ae80f8fc9993638608fc1a51c6ab0eeb12618c" },
"lsp_signature.nvim": { "branch": "master", "commit": "33250c84c7a552daf28ac607d9d9e82f88cd0907" },
"lspkind.nvim": { "branch": "master", "commit": "57610d5ab560c073c465d6faf0c19f200cb67e6e" },
Expand Down
8 changes: 8 additions & 0 deletions config/.config/nvim/lua/colors.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
local M = {}

local palletes = require("catppuccin.palettes")
local palette = palletes.get_palette("frappe")

M.palette = palette

return M
4 changes: 3 additions & 1 deletion config/.config/nvim/lua/pluginconfig/bufferline.lua
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
local M = {}

function M.setup()
local palette = require('colors').palette

local hl_selected = { bg = 'none', italic = false, bold = true }
local hl_normal_fg = { highlight = 'Normal', attribute = 'fg' }
local hl_comment_fg = { highlight = 'Comment', attribute = 'fg' }
local hl_separator = { fg = '#262a3f', bg = 'none' }
local hl_separator = { fg = palette.surface1, bg = 'none' }

require('bufferline').setup({
options = {
Expand Down
61 changes: 31 additions & 30 deletions config/.config/nvim/lua/pluginconfig/cmp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,48 +26,49 @@ end

function M.init()
local augroup = vim.api.nvim_create_augroup('cmp_init', { clear = true })
local palette = require('colors').palette

-- https://github.com/hrsh7th/nvim-cmp/wiki/Menu-Appearance#how-to-get-types-on-the-left-and-offset-the-menu
local tbl = {
CmpItemAbbrDeprecated = { fg = '#6b7089', bg = 'NONE', fmt = 'strikethrough' },
CmpItemAbbrMatch = { fg = '#91acd1', bg = 'NONE', fmt = 'bold' },
CmpItemAbbrMatchFuzzy = { fg = '#91acd1', bg = 'NONE', fmt = 'bold' },
CmpItemMenu = { fg = '#ada0d3', bg = 'NONE', fmt = 'italic' },
CmpItemAbbrDeprecated = { fg = palette.overlay0, bg = "NONE", strikethrough = true },
CmpItemAbbrMatch = { fg = palette.blue, bg = "NONE", bold = true },
CmpItemAbbrMatchFuzzy = { fg = palette.blue, bg = "NONE", bold = true },
CmpItemMenu = { fg = palette.mauve, bg = "NONE", italic = true },

CmpItemKindField = { fg = '#c6c8d1', bg = '#e27878' },
CmpItemKindProperty = { fg = '#c6c8d1', bg = '#e27878' },
CmpItemKindEvent = { fg = '#c6c8d1', bg = '#e27878' },
CmpItemKindField = { fg = palette.text, bg = palette.red },
CmpItemKindProperty = { fg = palette.text, bg = palette.red },
CmpItemKindEvent = { fg = palette.text, bg = palette.red },

CmpItemKindText = { fg = '#c6c8d1', bg = '#b4be82' },
CmpItemKindEnum = { fg = '#c6c8d1', bg = '#b4be82' },
CmpItemKindKeyword = { fg = '#c6c8d1', bg = '#b4be82' },
CmpItemKindText = { fg = palette.text, bg = palette.green },
CmpItemKindEnum = { fg = palette.text, bg = palette.green },
CmpItemKindKeyword = { fg = palette.text, bg = palette.green },

CmpItemKindConstant = { fg = '#c6c8d1', bg = '#e2a478' },
CmpItemKindConstructor = { fg = '#c6c8d1', bg = '#e2a478' },
CmpItemKindReference = { fg = '#c6c8d1', bg = '#e2a478' },
CmpItemKindConstant = { fg = palette.text, bg = palette.yellow },
CmpItemKindConstructor = { fg = palette.text, bg = palette.yellow },
CmpItemKindReference = { fg = palette.text, bg = palette.yellow },

CmpItemKindFunction = { fg = '#c6c8d1', bg = '#a093c7' },
CmpItemKindStruct = { fg = '#c6c8d1', bg = '#a093c7' },
CmpItemKindClass = { fg = '#c6c8d1', bg = '#a093c7' },
CmpItemKindModule = { fg = '#c6c8d1', bg = '#a093c7' },
CmpItemKindOperator = { fg = '#c6c8d1', bg = '#a093c7' },
CmpItemKindFunction = { fg = palette.text, bg = palette.mauve },
CmpItemKindStruct = { fg = palette.text, bg = palette.mauve },
CmpItemKindClass = { fg = palette.text, bg = palette.mauve },
CmpItemKindModule = { fg = palette.text, bg = palette.mauve },
CmpItemKindOperator = { fg = palette.text, bg = palette.mauve },

CmpItemKindVariable = { fg = '#c6c8d1', bg = '#6b7089' },
CmpItemKindFile = { fg = '#c6c8d1', bg = '#6b7089' },
CmpItemKindVariable = { fg = palette.text, bg = palette.overlay0 },
CmpItemKindFile = { fg = palette.text, bg = palette.overlay0 },

CmpItemKindUnit = { fg = '#c6c8d1', bg = '#6b7089' },
CmpItemKindSnippet = { fg = '#c6c8d1', bg = '#6b7089' },
CmpItemKindFolder = { fg = '#c6c8d1', bg = '#6b7089' },
CmpItemKindUnit = { fg = palette.text, bg = palette.peach },
CmpItemKindSnippet = { fg = palette.text, bg = palette.peach },
CmpItemKindFolder = { fg = palette.text, bg = palette.peach },

CmpItemKindMethod = { fg = '#c6c8d1', bg = '#84a0c6' },
CmpItemKindValue = { fg = '#c6c8d1', bg = '#84a0c6' },
CmpItemKindEnumMember = { fg = '#c6c8d1', bg = '#84a0c6' },
CmpItemKindMethod = { fg = palette.text, bg = palette.blue },
CmpItemKindValue = { fg = palette.text, bg = palette.blue },
CmpItemKindEnumMember = { fg = palette.text, bg = palette.blue },

CmpItemKindInterface = { fg = '#c6c8d1', bg = '#89b8c2' },
CmpItemKindColor = { fg = '#c6c8d1', bg = '#89b8c2' },
CmpItemKindTypeParameter = { fg = '#c6c8d1', bg = '#89b8c2' },
CmpItemKindInterface = { fg = palette.text, bg = palette.teal },
CmpItemKindColor = { fg = palette.text, bg = palette.teal },
CmpItemKindTypeParameter = { fg = palette.text, bg = palette.teal },

CmpItemKindCopilot = { fg = '#c6c8d1', bg = '#a093c7' },
CmpItemKindCopilot = { fg = palette.text, bg = palette.lavender },
}

for key, colors in pairs(tbl) do
Expand Down
4 changes: 3 additions & 1 deletion config/.config/nvim/lua/pluginconfig/lualine.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
local M = {}

function M.setup()
local palette = require('colors').palette
local codicons = require('codicons')

require('lualine').setup({
options = {
icons_enabled = true,
Expand All @@ -19,7 +21,7 @@ function M.setup()
require('pluginconfig.dap').status,
icon = { codicons.get('debug') },
cond = require('pluginconfig.dap').is_loaded,
color = { fg = '#b4be82' }
color = { fg = palette.teal }
},
'filename',
{ 'aerial', sep = '  ', dence = true }, -- the same as copmonent separator
Expand Down
18 changes: 10 additions & 8 deletions config/.config/nvim/lua/pluginconfig/modes.lua
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
local M = {}

function M.setup()
local palette = require('colors').palette

require('modes').setup({
colors = {
copy = '#e2a478', -- yellow
delete = '#e27878', -- red
insert = '#89b8c2', -- cyan
visual = '#a093c7', -- purple
copy = palette.yellow,
delete = palette.red,
insert = palette.sky,
visual = palette.mauve,
},
line_opacity = {
copy = 0.15,
delete = 0.15,
insert = 0.15,
visual = 0.25,
copy = 0.4,
delete = 0.4,
insert = 0.4,
visual = 0.4,
}
})
end
Expand Down
Loading
Loading