2024-01-14 18:48:01 -03:00
|
|
|
return {
|
|
|
|
'akinsho/bufferline.nvim',
|
|
|
|
version = "*",
|
2024-01-16 12:52:36 -03:00
|
|
|
dependencies = { 'nvim-tree/nvim-web-devicons', "water-sucks/darkrose.nvim" },
|
2024-02-14 08:51:49 -03:00
|
|
|
event = "BufEnter",
|
2024-01-14 18:48:01 -03:00
|
|
|
config = function()
|
2024-02-14 08:51:49 -03:00
|
|
|
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()
|
2024-01-14 18:48:01 -03:00
|
|
|
options = {
|
|
|
|
show_buffer_icons = false,
|
|
|
|
}
|
2024-02-14 08:51:49 -03:00
|
|
|
else
|
|
|
|
options = {
|
|
|
|
show_buffer_icons = false,
|
2024-04-18 16:21:39 -03:00
|
|
|
diagnostics = "nvim_lsp",
|
2024-02-14 08:51:49 -03:00
|
|
|
}
|
|
|
|
end
|
|
|
|
|
|
|
|
require('bufferline').setup({
|
|
|
|
highlights = highlights,
|
|
|
|
options = options,
|
2024-01-14 18:48:01 -03:00
|
|
|
})
|
|
|
|
end
|
|
|
|
}
|