Improved theme and added dark mode toggle
This commit is contained in:
parent
f0db7a9095
commit
14e64c8467
5 changed files with 50 additions and 31 deletions
9
lua/core/plugin_config/darklight.lua
Normal file
9
lua/core/plugin_config/darklight.lua
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
require('darklight').setup({
|
||||
mode = 'custom', -- Sets darklight to custom mode
|
||||
light_mode_callback = function() -- Function to call to set light mode
|
||||
vim.opt.background="light"
|
||||
end,
|
||||
dark_mode_callback = function() -- Function to call to set dark mode
|
||||
vim.opt.background="dark"
|
||||
end,
|
||||
})
|
||||
|
|
@ -1,6 +1,31 @@
|
|||
vim.o.termguicolors = true
|
||||
vim.g.gruvbox_contrast_dark = 'hard'
|
||||
vim.g.gruvbox_contrast_light = 'hard'
|
||||
vim.g.gruvbox_improved_strings = 1
|
||||
vim.g.gruvbox_improved_warnings = 1
|
||||
vim.cmd [[colorscheme gruvbox]]
|
||||
require("gruvbox").setup({
|
||||
terminal_colors = true, -- add neovim terminal colors
|
||||
undercurl = true,
|
||||
underline = true,
|
||||
bold = true,
|
||||
italic = {
|
||||
strings = true,
|
||||
emphasis = true,
|
||||
comments = true,
|
||||
operators = false,
|
||||
folds = true,
|
||||
},
|
||||
strikethrough = true,
|
||||
invert_selection = false,
|
||||
invert_signs = false,
|
||||
invert_tabline = false,
|
||||
invert_intend_guides = false,
|
||||
inverse = true, -- invert background for search, diffs, statuslines and errors
|
||||
contrast = "hard", -- can be "hard", "soft" or empty string
|
||||
palette_overrides = {
|
||||
light0_hard = '#ffffff',
|
||||
light1 = '#f2f2f2',
|
||||
light2 = '#e3e3e3',
|
||||
light3 = '#d1d1d1',
|
||||
light4 = '#c3c3c3',
|
||||
},
|
||||
overrides = {},
|
||||
dim_inactive = false,
|
||||
transparent_mode = false,
|
||||
})
|
||||
vim.cmd("colorscheme gruvbox")
|
||||
|
|
|
|||
|
|
@ -9,3 +9,4 @@ require("core.plugin_config.terminal")
|
|||
require("core.plugin_config.whichkey")
|
||||
require("core.plugin_config.indent-blankline")
|
||||
require("core.plugin_config.org")
|
||||
require("core.plugin_config.darklight")
|
||||
|
|
|
|||
|
|
@ -58,6 +58,12 @@ local keymap = {
|
|||
l = "Go to the right window",
|
||||
k = "Go to the up window",
|
||||
j = "Go to the down window",
|
||||
},
|
||||
o = {
|
||||
name = '+org mode',
|
||||
},
|
||||
m = {
|
||||
'<Cmd>DarkLightSwitch<CR>', 'Toggle dark mode'
|
||||
}
|
||||
}
|
||||
-- Map window keys to leader w
|
||||
|
|
|
|||
|
|
@ -69,31 +69,9 @@ local plugins = {
|
|||
dependencies = {
|
||||
{ 'nvim-treesitter/nvim-treesitter', lazy = true },
|
||||
},
|
||||
--event = 'VeryLazy',
|
||||
--config = function()
|
||||
---- Load treesitter grammar for org
|
||||
--require('orgmode').setup_ts_grammar()
|
||||
|
||||
---- Setup treesitter
|
||||
--require('nvim-treesitter.configs').setup({
|
||||
-- highlight = {
|
||||
-- enable = true,
|
||||
-- additional_vim_regex_highlighting = { 'org' },
|
||||
-- },
|
||||
-- ensure_installed = { 'org' },
|
||||
--})
|
||||
|
||||
---- Setup orgmode
|
||||
--require('orgmode').setup({
|
||||
-- org_agenda_files = '~/.vimwiki/**/*',
|
||||
-- org_default_notes_file = '~/.vimwiki/refile.org',
|
||||
--})
|
||||
---- Setup nvim-cmp
|
||||
--require('cmp').setup({
|
||||
-- sources = { { name = 'orgmode' } }
|
||||
--})
|
||||
--end,
|
||||
}
|
||||
},
|
||||
-- Lightmode switcher
|
||||
'eliseshaffer/darklight.nvim'
|
||||
}
|
||||
|
||||
local opts = {}
|
||||
|
|
|
|||
Loading…
Reference in a new issue