1
0
mirror of https://github.com/jdhao/nvim-config.git synced 2025-06-08 14:14:33 +02:00

update colorscheme list

- remove other gruvbox variant
- remove doom-one casue it has bugs
- add more colorschemes
This commit is contained in:
jdhao 2022-11-16 02:25:20 +08:00
parent 074d2bbdfd
commit 8b10be60d4
2 changed files with 40 additions and 5 deletions

View File

@ -7,17 +7,19 @@ local M = {}
-- Colorscheme to its directory name mapping, because colorscheme repo name is not necessarily
-- the same as the colorscheme name itself.
M.colorscheme2dir = {
gruvbox8 = "vim-gruvbox8",
onedark = "onedark.nvim",
edge = "edge",
sonokai = "sonokai",
gruvbox_material = "gruvbox-material",
nord = "nord.nvim",
doom_one = "doom-one.nvim",
everforest = "everforest",
nightfox = "nightfox.nvim",
kanagawa = "kanagawa.nvim",
catppuccin = "catppuccin",
rose_pine = "rose-pine",
onedarkpro = "onedarkpro.nvim",
monokai = "monokai.nvim",
material = "material.nvim",
}
M.gruvbox8 = function()
@ -50,6 +52,10 @@ M.sonokai = function()
end
M.gruvbox_material = function()
-- foreground option can be material, mix, or original
vim.g.gruvbox_material_foreground = "material"
--background option can be hard, medium, soft
vim.g.gruvbox_material_background = "soft"
vim.g.gruvbox_material_enable_italic = 1
vim.g.gruvbox_material_better_performance = 1
@ -88,6 +94,34 @@ M.catppuccin = function()
vim.cmd([[colorscheme catppuccin]])
end
M.rose_pine = function()
require('rose-pine').setup({
--- @usage 'main' | 'moon'
dark_variant = 'moon',
})
-- set colorscheme after options
vim.cmd('colorscheme rose-pine')
end
M.onedarkpro = function()
require("onedarkpro").setup({
dark_theme = "onedark", -- The default dark theme
})
-- set colorscheme after options
vim.cmd('colorscheme onedarkpro')
end
M.monokai = function()
vim.cmd('colorscheme monokai_pro')
end
M.material = function ()
vim.g.material_style = "oceanic"
vim.cmd('colorscheme material')
end
--- Use a random colorscheme from the pre-defined list of colorschemes.
M.rand_colorscheme = function()
local colorscheme = utils.rand_element(vim.tbl_keys(M.colorscheme2dir))

View File

@ -28,7 +28,6 @@ local function packer_ensure_install()
return true
end
local fresh_install = packer_ensure_install()
-- Load packer.nvim
@ -124,17 +123,19 @@ packer.startup {
use { "nvim-telescope/telescope-symbols.nvim", after = "telescope.nvim" }
-- A list of colorscheme plugin you may want to try. Find what suits you.
use { "lifepillar/vim-gruvbox8", opt = true }
use { "navarasu/onedark.nvim", opt = true }
use { "sainnhe/edge", opt = true }
use { "sainnhe/sonokai", opt = true }
use { "sainnhe/gruvbox-material", opt = true }
use { "shaunsingh/nord.nvim", opt = true }
use { "NTBBloodbath/doom-one.nvim", opt = true }
use { "sainnhe/everforest", opt = true }
use { "EdenEast/nightfox.nvim", opt = true }
use { "rebelot/kanagawa.nvim", opt = true }
use { "catppuccin/nvim", as = "catppuccin", opt = true }
use({ "rose-pine/neovim", as = 'rose-pine', opt = true })
use { "olimorris/onedarkpro.nvim", opt = true }
use { "tanvirtin/monokai.nvim", opt = true }
use { "marko-cerovac/material.nvim", opt = true }
use { "kyazdani42/nvim-web-devicons", event = "VimEnter" }