feat: add theme toggle btn | update theme plugin path
This commit is contained in:
parent
0601876ab6
commit
b9a1038acd
@ -20,7 +20,8 @@ M.options = {
|
|||||||
M.ui = {
|
M.ui = {
|
||||||
hl_override = {},
|
hl_override = {},
|
||||||
changed_themes = {},
|
changed_themes = {},
|
||||||
colors = "", -- path of your file that contains colors
|
colors = {}, -- dynamically generated, never edit this in chadrc
|
||||||
|
theme_toggle = { "onedark", "one_light" },
|
||||||
theme = "onedark", -- default theme
|
theme = "onedark", -- default theme
|
||||||
transparency = false,
|
transparency = false,
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,7 @@ local g = vim.g
|
|||||||
-- use filetype.lua instead of filetype.vim
|
-- use filetype.lua instead of filetype.vim
|
||||||
g.did_load_filetypes = 0
|
g.did_load_filetypes = 0
|
||||||
g.do_filetype_lua = 1
|
g.do_filetype_lua = 1
|
||||||
|
g.toggle_theme_icon = " "
|
||||||
|
|
||||||
opt.confirm = true
|
opt.confirm = true
|
||||||
opt.laststatus = 3 -- global statusline
|
opt.laststatus = 3 -- global statusline
|
||||||
|
@ -4,13 +4,23 @@ if not present then
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
vim.cmd [[
|
||||||
|
function! Toggle_theme(a,b,c,d)
|
||||||
|
lua require('base46').toggle_theme()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! Quit_vim(a,b,c,d)
|
||||||
|
qa
|
||||||
|
endfunction
|
||||||
|
]]
|
||||||
|
|
||||||
local options = {
|
local options = {
|
||||||
options = {
|
options = {
|
||||||
offsets = { { filetype = "NvimTree", text = "", padding = 1 } },
|
offsets = { { filetype = "NvimTree", text = "", padding = 1 } },
|
||||||
buffer_close_icon = "",
|
buffer_close_icon = "",
|
||||||
modified_icon = "",
|
modified_icon = "",
|
||||||
close_icon = "",
|
close_icon = "",
|
||||||
show_close_icon = true,
|
show_close_icon = false,
|
||||||
left_trunc_marker = "",
|
left_trunc_marker = "",
|
||||||
right_trunc_marker = "",
|
right_trunc_marker = "",
|
||||||
max_name_length = 14,
|
max_name_length = 14,
|
||||||
@ -24,6 +34,16 @@ local options = {
|
|||||||
always_show_bufferline = true,
|
always_show_bufferline = true,
|
||||||
diagnostics = false,
|
diagnostics = false,
|
||||||
themable = true,
|
themable = true,
|
||||||
|
|
||||||
|
custom_areas = {
|
||||||
|
right = function()
|
||||||
|
return {
|
||||||
|
{ text = "%@Toggle_theme@" .. vim.g.toggle_theme_icon .. "%X" },
|
||||||
|
{ text = "%@Quit_vim@ %X" },
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
custom_filter = function(buf_number)
|
custom_filter = function(buf_number)
|
||||||
-- Func to filter out our managed/persistent split terms
|
-- Func to filter out our managed/persistent split terms
|
||||||
local present_type, type = pcall(function()
|
local present_type, type = pcall(function()
|
||||||
|
@ -4,7 +4,7 @@ if not present then
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local colors = require("base16").get_colors "base_30"
|
local colors = require("base46").get_colors "base_30"
|
||||||
|
|
||||||
local lsp = require "feline.providers.lsp"
|
local lsp = require "feline.providers.lsp"
|
||||||
local lsp_severity = vim.diagnostic.severity
|
local lsp_severity = vim.diagnostic.severity
|
||||||
|
@ -18,10 +18,10 @@ local plugins = {
|
|||||||
["NvChad/base46"] = {
|
["NvChad/base46"] = {
|
||||||
after = "packer.nvim",
|
after = "packer.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
local ok, base16 = pcall(require, "base16")
|
local ok, base46 = pcall(require, "base46")
|
||||||
|
|
||||||
if ok then
|
if ok then
|
||||||
base16.load_theme()
|
base46.load_theme()
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user