diff --git a/lua/custom/plugins/bufferline.lua b/lua/custom/plugins/bufferline.lua index fb1f45e..518be38 100644 --- a/lua/custom/plugins/bufferline.lua +++ b/lua/custom/plugins/bufferline.lua @@ -2,12 +2,37 @@ return { 'akinsho/bufferline.nvim', version = "*", dependencies = { 'nvim-tree/nvim-web-devicons', "water-sucks/darkrose.nvim" }, + event = "BufEnter", config = function() - require("bufferline").setup({ - -- -- -- -- -- -- -- -- -- -- -- highlights = require("darkrose.integrations.bufferline").generate(), + local highlights = {} + local options = {} + + local home = os.getenv("HOME") + local open = io.open + + local function read_file(path) + local file = open(path, "rb") + if not file then return nil end + local content = file:read "*l" + file:close() + return content + end + + local fileContent = read_file(string.format("%s/colorscheme", home)); + if fileContent == "red" then + highlights = require("darkrose.integrations.bufferline").generate() options = { show_buffer_icons = false, } + else + options = { + show_buffer_icons = false, + } + end + + require('bufferline').setup({ + highlights = highlights, + options = options, }) end } diff --git a/lua/custom/plugins/colorscheme.lua b/lua/custom/plugins/colorscheme.lua index f85e65e..90fda35 100644 --- a/lua/custom/plugins/colorscheme.lua +++ b/lua/custom/plugins/colorscheme.lua @@ -1,6 +1,5 @@ local home = os.getenv("HOME") local colorscheme = {} - local open = io.open local function read_file(path) @@ -66,6 +65,19 @@ elseif fileContent == "red" then Group.new("@comment", colors.gray, colors.none, styles.italic) end } +elseif fileContent == "melange" then + colorscheme = { + "savq/melange-nvim", + lazy = false, + dependencies = { "tjdevries/colorbuddy.vim" }, + priority = 1000, + config = function() + vim.opt.termguicolors = true + vim.o.background = 'light' + vim.cmd.colorscheme 'melange' + end, + + } else colorscheme = { "bluz71/vim-moonfly-colors",