diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index ad91ead..3168638 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -20,7 +20,8 @@ M.options = { M.ui = { hl_override = {}, 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 transparency = false, } diff --git a/lua/core/options.lua b/lua/core/options.lua index 342a1cd..c9346c4 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -4,6 +4,7 @@ local g = vim.g -- use filetype.lua instead of filetype.vim g.did_load_filetypes = 0 g.do_filetype_lua = 1 +g.toggle_theme_icon = "  " opt.confirm = true opt.laststatus = 3 -- global statusline diff --git a/lua/plugins/configs/bufferline.lua b/lua/plugins/configs/bufferline.lua index 2b16535..89ff4da 100644 --- a/lua/plugins/configs/bufferline.lua +++ b/lua/plugins/configs/bufferline.lua @@ -4,13 +4,23 @@ if not present then return 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 = { options = { offsets = { { filetype = "NvimTree", text = "", padding = 1 } }, buffer_close_icon = "", modified_icon = "", close_icon = "", - show_close_icon = true, + show_close_icon = false, left_trunc_marker = "", right_trunc_marker = "", max_name_length = 14, @@ -24,6 +34,16 @@ local options = { always_show_bufferline = true, diagnostics = false, 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) -- Func to filter out our managed/persistent split terms local present_type, type = pcall(function() diff --git a/lua/plugins/configs/statusline.lua b/lua/plugins/configs/statusline.lua index 1714662..fdc4beb 100644 --- a/lua/plugins/configs/statusline.lua +++ b/lua/plugins/configs/statusline.lua @@ -4,7 +4,7 @@ if not present then return 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_severity = vim.diagnostic.severity diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 727b99c..4b9143f 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -18,10 +18,10 @@ local plugins = { ["NvChad/base46"] = { after = "packer.nvim", config = function() - local ok, base16 = pcall(require, "base16") + local ok, base46 = pcall(require, "base46") if ok then - base16.load_theme() + base46.load_theme() end end, },