Light theme
This commit is contained in:
3
init.lua
3
init.lua
@@ -20,3 +20,6 @@ vim.opt.rtp:prepend(lazypath)
|
|||||||
|
|
||||||
-- Load plugins
|
-- Load plugins
|
||||||
require("lazy").setup("plugins")
|
require("lazy").setup("plugins")
|
||||||
|
|
||||||
|
-- Theme
|
||||||
|
require("theme_switcher").toggle()
|
||||||
|
|||||||
@@ -27,3 +27,6 @@ if vim.g.neovide == true then
|
|||||||
map("n", "<C-+>", ":lua vim.g.neovide_scale_factor = math.min(vim.g.neovide_scale_factor + 0.1, 1.0)<CR>")
|
map("n", "<C-+>", ":lua vim.g.neovide_scale_factor = math.min(vim.g.neovide_scale_factor + 0.1, 1.0)<CR>")
|
||||||
map("n", "<C-_>", ":lua vim.g.neovide_scale_factor = math.max(vim.g.neovide_scale_factor - 0.1, 0.1)<CR>")
|
map("n", "<C-_>", ":lua vim.g.neovide_scale_factor = math.max(vim.g.neovide_scale_factor - 0.1, 0.1)<CR>")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Theme toggling
|
||||||
|
map("n", "<leader>t", ":lua require('theme_switcher').toggle()<CR>")
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
local g, opt, cmd = vim.g, vim.opt, vim.cmd
|
local g, opt, o = vim.g, vim.opt, vim.o
|
||||||
|
|
||||||
-- Settings
|
-- Settings
|
||||||
g.mapleader = " "
|
g.mapleader = " "
|
||||||
@@ -38,27 +38,10 @@ opt.smartcase = true
|
|||||||
opt.hlsearch = true
|
opt.hlsearch = true
|
||||||
opt.incsearch = true
|
opt.incsearch = true
|
||||||
|
|
||||||
-- Transparency
|
|
||||||
vim.cmd([[highlight Normal guibg=none]])
|
|
||||||
vim.cmd([[highlight NonText guibg=none]])
|
|
||||||
vim.cmd([[highlight Normal ctermbg=none]])
|
|
||||||
vim.cmd([[highlight NonText ctermbg=none]])
|
|
||||||
|
|
||||||
-- Code Folding
|
-- Code Folding
|
||||||
opt.foldmethod = "syntax"
|
opt.foldmethod = "expr"
|
||||||
|
opt.foldexpr = "nvim_treesitter#foldexpr()"
|
||||||
opt.foldlevel = 99
|
opt.foldlevel = 99
|
||||||
|
|
||||||
-- Neovide
|
-- Theme
|
||||||
if g.neovide == true then
|
o.background = "light"
|
||||||
g.neovide_transparency = 0.7
|
|
||||||
g.neovide_scale_factor = 0.5
|
|
||||||
|
|
||||||
-- Disable animations
|
|
||||||
g.neovide_position_animation_length = 0
|
|
||||||
g.neovide_cursor_animation_length = 0.00
|
|
||||||
g.neovide_cursor_trail_size = 0
|
|
||||||
g.neovide_cursor_animate_in_insert_mode = false
|
|
||||||
g.neovide_cursor_animate_command_line = false
|
|
||||||
g.neovide_scroll_animation_far_lines = 0
|
|
||||||
g.neovide_scroll_animation_length = 0.00
|
|
||||||
end
|
|
||||||
|
|||||||
20
lua/theme_switcher/init.lua
Normal file
20
lua/theme_switcher/init.lua
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
function M.toggle()
|
||||||
|
if vim.o.background == "light" then
|
||||||
|
vim.o.background = "dark"
|
||||||
|
vim.cmd [[colorscheme default]]
|
||||||
|
else
|
||||||
|
vim.o.background = "light"
|
||||||
|
vim.cmd [[colorscheme shine]]
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.cmd [[
|
||||||
|
hi Normal guibg=none
|
||||||
|
hi NonText guibg=none
|
||||||
|
hi Normal ctermbg=none
|
||||||
|
hi NonText ctermbg=none
|
||||||
|
]]
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
Reference in New Issue
Block a user