1
Fork 0

Rosepine theme!

This commit is contained in:
Matei Adriel 2023-01-22 01:22:38 +01:00
commit 493954c1e3
No known key found for this signature in database
23 changed files with 464 additions and 262 deletions
dotfiles/neovim/lua/my/plugins/themes

View 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

View 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

View file

@ -0,0 +1,4 @@
return {
require("my.plugins.themes.catppuccin"),
require("my.plugins.themes.rosepine"),
}

View 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