make it interact with my colorscheme changer script
This commit is contained in:
parent
68fa24fca5
commit
04d4011ee5
@ -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
|
||||
}
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user