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',
|
'akinsho/bufferline.nvim',
|
||||||
version = "*",
|
version = "*",
|
||||||
dependencies = { 'nvim-tree/nvim-web-devicons', "water-sucks/darkrose.nvim" },
|
dependencies = { 'nvim-tree/nvim-web-devicons', "water-sucks/darkrose.nvim" },
|
||||||
|
event = "BufEnter",
|
||||||
config = function()
|
config = function()
|
||||||
require("bufferline").setup({
|
local highlights = {}
|
||||||
-- -- -- -- -- -- -- -- -- -- -- highlights = require("darkrose.integrations.bufferline").generate(),
|
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 = {
|
options = {
|
||||||
show_buffer_icons = false,
|
show_buffer_icons = false,
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
options = {
|
||||||
|
show_buffer_icons = false,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
require('bufferline').setup({
|
||||||
|
highlights = highlights,
|
||||||
|
options = options,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
local home = os.getenv("HOME")
|
local home = os.getenv("HOME")
|
||||||
local colorscheme = {}
|
local colorscheme = {}
|
||||||
|
|
||||||
local open = io.open
|
local open = io.open
|
||||||
|
|
||||||
local function read_file(path)
|
local function read_file(path)
|
||||||
@ -66,6 +65,19 @@ elseif fileContent == "red" then
|
|||||||
Group.new("@comment", colors.gray, colors.none, styles.italic)
|
Group.new("@comment", colors.gray, colors.none, styles.italic)
|
||||||
end
|
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
|
else
|
||||||
colorscheme = {
|
colorscheme = {
|
||||||
"bluz71/vim-moonfly-colors",
|
"bluz71/vim-moonfly-colors",
|
||||||
|
Loading…
Reference in New Issue
Block a user