mirror of
https://github.com/jdhao/nvim-config.git
synced 2025-06-08 14:14:33 +02:00
update colorscheme config (#379)
This commit is contained in:
parent
4b8c490abd
commit
93166c65a5
@ -1,5 +1,4 @@
|
|||||||
--- This module will load a random colorscheme on nvim startup process.
|
--- This module will load a random colorscheme on nvim startup process.
|
||||||
|
|
||||||
local utils = require("utils")
|
local utils = require("utils")
|
||||||
|
|
||||||
local M = {}
|
local M = {}
|
||||||
@ -8,9 +7,14 @@ local M = {}
|
|||||||
-- the same as the colorscheme name itself.
|
-- the same as the colorscheme name itself.
|
||||||
M.colorscheme_conf = {
|
M.colorscheme_conf = {
|
||||||
onedark = function()
|
onedark = function()
|
||||||
vim.cmd([[colorscheme onedark]])
|
-- Lua
|
||||||
|
require("onedark").setup {
|
||||||
|
style = "darker",
|
||||||
|
}
|
||||||
|
require("onedark").load()
|
||||||
end,
|
end,
|
||||||
edge = function()
|
edge = function()
|
||||||
|
vim.g.edge_style = "default"
|
||||||
vim.g.edge_enable_italic = 1
|
vim.g.edge_enable_italic = 1
|
||||||
vim.g.edge_better_performance = 1
|
vim.g.edge_better_performance = 1
|
||||||
|
|
||||||
@ -26,13 +30,14 @@ M.colorscheme_conf = {
|
|||||||
-- foreground option can be material, mix, or original
|
-- foreground option can be material, mix, or original
|
||||||
vim.g.gruvbox_material_foreground = "original"
|
vim.g.gruvbox_material_foreground = "original"
|
||||||
--background option can be hard, medium, soft
|
--background option can be hard, medium, soft
|
||||||
vim.g.gruvbox_material_background = "medium"
|
vim.g.gruvbox_material_background = "hard"
|
||||||
vim.g.gruvbox_material_enable_italic = 1
|
vim.g.gruvbox_material_enable_italic = 1
|
||||||
vim.g.gruvbox_material_better_performance = 1
|
vim.g.gruvbox_material_better_performance = 1
|
||||||
|
|
||||||
vim.cmd([[colorscheme gruvbox-material]])
|
vim.cmd([[colorscheme gruvbox-material]])
|
||||||
end,
|
end,
|
||||||
everforest = function()
|
everforest = function()
|
||||||
|
vim.g.everforest_background = "hard"
|
||||||
vim.g.everforest_enable_italic = 1
|
vim.g.everforest_enable_italic = 1
|
||||||
vim.g.everforest_better_performance = 1
|
vim.g.everforest_better_performance = 1
|
||||||
|
|
||||||
@ -50,10 +55,11 @@ M.colorscheme_conf = {
|
|||||||
end,
|
end,
|
||||||
onedarkpro = function()
|
onedarkpro = function()
|
||||||
-- set colorscheme after options
|
-- set colorscheme after options
|
||||||
vim.cmd("colorscheme onedark_vivid")
|
-- onedark_vivid does not enough contrast
|
||||||
|
vim.cmd("colorscheme onedark_dark")
|
||||||
end,
|
end,
|
||||||
material = function()
|
material = function()
|
||||||
vim.g.material_style = "oceanic"
|
vim.g.material_style = "darker"
|
||||||
vim.cmd("colorscheme material")
|
vim.cmd("colorscheme material")
|
||||||
end,
|
end,
|
||||||
arctic = function()
|
arctic = function()
|
||||||
@ -67,6 +73,7 @@ M.colorscheme_conf = {
|
|||||||
--- Use a random colorscheme from the pre-defined list of colorschemes.
|
--- Use a random colorscheme from the pre-defined list of colorschemes.
|
||||||
M.rand_colorscheme = function()
|
M.rand_colorscheme = function()
|
||||||
local colorscheme = utils.rand_element(vim.tbl_keys(M.colorscheme_conf))
|
local colorscheme = utils.rand_element(vim.tbl_keys(M.colorscheme_conf))
|
||||||
|
colorscheme = "gruvbox_material"
|
||||||
|
|
||||||
if not vim.tbl_contains(vim.tbl_keys(M.colorscheme_conf), colorscheme) then
|
if not vim.tbl_contains(vim.tbl_keys(M.colorscheme_conf), colorscheme) then
|
||||||
local msg = "Invalid colorscheme: " .. colorscheme
|
local msg = "Invalid colorscheme: " .. colorscheme
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user