Rosepine theme!
This commit is contained in:
parent
2efcb0b1a5
commit
493954c1e3
23 changed files with 464 additions and 262 deletions
dotfiles/neovim/lua/my/plugins/themes
25
dotfiles/neovim/lua/my/plugins/themes/catppuccin.lua
Normal file
25
dotfiles/neovim/lua/my/plugins/themes/catppuccin.lua
Normal file
|
@ -0,0 +1,25 @@
|
|||
local H = require("my.plugins.themes.helpers")
|
||||
|
||||
local M = {
|
||||
"catppuccin/nvim",
|
||||
name = "catppuccin",
|
||||
lazy = false,
|
||||
enabled = H.theme_contains("Catppuccin"),
|
||||
}
|
||||
|
||||
function M.config()
|
||||
local catppuccin = require("catppuccin")
|
||||
vim.g.catppuccin_flavour = H.variant("Catppuccin")
|
||||
|
||||
catppuccin.setup({
|
||||
transparent_background = false,
|
||||
integrations = { nvimtree = true },
|
||||
})
|
||||
|
||||
vim.cmd([[highlight NotifyINFOIcon guifg=#d6b20f]])
|
||||
vim.cmd([[highlight NotifyINFOTitle guifg=#d6b20f]])
|
||||
|
||||
vim.cmd("colorscheme catppuccin")
|
||||
end
|
||||
|
||||
return M
|
14
dotfiles/neovim/lua/my/plugins/themes/helpers.lua
Normal file
14
dotfiles/neovim/lua/my/plugins/themes/helpers.lua
Normal file
|
@ -0,0 +1,14 @@
|
|||
local theme = require("nix.theme").name
|
||||
|
||||
local M = {}
|
||||
|
||||
function M.theme_contains(name)
|
||||
return string.find(theme, name) ~= nil
|
||||
end
|
||||
|
||||
function M.variant(name)
|
||||
-- +1 for 1-indexed strings and +1 for the space between name and variant
|
||||
return string.lower(string.sub(theme, string.len(name) + 2))
|
||||
end
|
||||
|
||||
return M
|
4
dotfiles/neovim/lua/my/plugins/themes/init.lua
Normal file
4
dotfiles/neovim/lua/my/plugins/themes/init.lua
Normal file
|
@ -0,0 +1,4 @@
|
|||
return {
|
||||
require("my.plugins.themes.catppuccin"),
|
||||
require("my.plugins.themes.rosepine"),
|
||||
}
|
31
dotfiles/neovim/lua/my/plugins/themes/rosepine.lua
Normal file
31
dotfiles/neovim/lua/my/plugins/themes/rosepine.lua
Normal file
|
@ -0,0 +1,31 @@
|
|||
local H = require("my.plugins.themes.helpers")
|
||||
|
||||
local M = {
|
||||
"rose-pine/neovim",
|
||||
name = "rose-pine",
|
||||
lazy = false,
|
||||
enabled = H.theme_contains("Rosé Pine"),
|
||||
}
|
||||
|
||||
function M.config()
|
||||
local variant = H.variant("Rosé Pine")
|
||||
|
||||
if variant == "dawn" then
|
||||
vim.o.background = "light"
|
||||
else
|
||||
vim.o.background = "dark"
|
||||
end
|
||||
|
||||
local dark_variants = {
|
||||
[""] = "main",
|
||||
moon = "moon",
|
||||
}
|
||||
|
||||
require("rose-pine").setup({
|
||||
dark_variant = dark_variants[variant],
|
||||
})
|
||||
|
||||
vim.cmd("colorscheme rose-pine")
|
||||
end
|
||||
|
||||
return M
|
Loading…
Add table
Add a link
Reference in a new issue