neovim-config/lua/plugins/bufferline.lua
Akianonymus d16ffabcfd [1/4] Refactor: plugins: Add seperate config for each plugins
first commit of Refactor

handle require errors

move config from other places to proper files

don't create a pseudo config function for no reason

https://github.com/siduck76/NvChad/pull/156#issuecomment-881453546
2021-07-16 19:36:54 +05:30

111 lines
2.7 KiB
Lua

local global_theme = "themes/" .. vim.g.nvchad_theme
local colors = require(global_theme)
local bufferline
if
not pcall(
function()
bufferline = require "bufferline"
end
)
then
return
end
bufferline.setup {
options = {
offsets = {{filetype = "NvimTree", text = "", padding = 1}},
buffer_close_icon = "",
modified_icon = "",
close_icon = "",
left_trunc_marker = "",
right_trunc_marker = "",
max_name_length = 14,
max_prefix_length = 13,
tab_size = 20,
show_tab_indicators = true,
enforce_regular_tabs = false,
view = "multiwindow",
show_buffer_close_icons = true,
separator_style = "thin",
mappings = true,
always_show_bufferline = true
},
highlights = {
fill = {
guifg = colors.grey_fg,
guibg = colors.black2
},
background = {
guifg = colors.grey_fg,
guibg = colors.black2
},
-- buffers
buffer_visible = {
guifg = colors.light_grey,
guibg = colors.black2
},
buffer_selected = {
guifg = colors.white,
guibg = colors.black,
gui = "bold"
},
-- tabs
tab = {
guifg = colors.light_grey,
guibg = colors.one_bg3
},
tab_selected = {
guifg = colors.black2,
guibg = colors.nord_blue
},
tab_close = {
guifg = colors.red,
guibg = colors.black
},
indicator_selected = {
guifg = colors.black,
guibg = colors.black
},
-- separators
separator = {
guifg = colors.black2,
guibg = colors.black2
},
separator_visible = {
guifg = colors.black2,
guibg = colors.black2
},
separator_selected = {
guifg = colors.black2,
guibg = colors.black2
},
-- modified
modified = {
guifg = colors.red,
guibg = colors.black2
},
modified_visible = {
guifg = colors.red,
guibg = colors.black2
},
modified_selected = {
guifg = colors.green,
guibg = colors.black
},
-- close buttons
close_button = {
guifg = colors.light_grey,
guibg = colors.black2
},
close_button_visible = {
guifg = colors.light_grey,
guibg = colors.black2
},
close_button_selected = {
guifg = colors.red,
guibg = colors.black
}
}
}