neovim-config/lua/plugins/configs/bufferline.lua
Akianonymus 9ffddb6b52 Restructure config | Move some to a packer plugin | Lot of cleanup
* move teleacope files, updater and related utils to
  https://github.com/NvChad/core

* restructure config file and directory structure

* expose mappings for better escape

* allow multiple mappings for some

* improve merge table function for the same

* move autocommands to a seperate file

* rearrange everything alphabetically where sanely possible

* rearrange packer plugin list on the basis of trigerred state

config structure now

 .
├──  init.lua
├──  LICENSE
├──  lua
│  ├──  chadrc.lua
│  ├──  colors
│  │  ├──  highlights.lua
│  │  ├──  init.lua
│  │  └──  themes
│  │     ├──  chadracula.lua
│  │     ├──  everforest.lua
│  │     ├──  gruvchad.lua
│  │     ├──  javacafe.lua
│  │     ├──  mountain.lua
│  │     ├──  norchad.lua
│  │     ├──  one-light.lua
│  │     ├──  onedark.lua
│  │     ├──  tokyonight.lua
│  │     └──  tomorrow-night.lua
│  ├──  core
│  │  ├──  autocmds.lua
│  │  ├──  init.lua
│  │  ├──  mappings.lua
│  │  ├──  options.lua
│  │  └──  utils.lua
│  ├──  default_config.lua
│  └──  plugins
│     ├──  configs
│     │  ├──  autopairs.lua
│     │  ├──  autosave.lua
│     │  ├──  bufferline.lua
│     │  ├──  chadsheet.lua
│     │  ├──  compe.lua
│     │  ├──  dashboard.lua
│     │  ├──  gitsigns.lua
│     │  ├──  icons.lua
│     │  ├──  lspconfig.lua
│     │  ├──  luasnip.lua
│     │  ├──  nvimtree.lua
│     │  ├──  others.lua
│     │  ├──  statusline.lua
│     │  ├──  telescope.lua
│     │  ├──  treesitter.lua
│     │  └──  zenmode.lua
│     ├──  init.lua
│     └──  packerInit.lua
└──  README.md
2021-08-22 17:54:10 +05:30

124 lines
2.9 KiB
Lua

local colors = require("colors").get()
local present, bufferline = pcall(require, "bufferline")
if not present 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",
always_show_bufferline = true,
custom_filter = function(buf_number)
-- Func to filter out our managed/persistent split terms
local present_type, type = pcall(function()
return vim.api.nvim_buf_get_var(buf_number, "term_type")
end)
if present_type then
if type == "vert" then
return false
elseif type == "hori" then
return false
else
return true
end
else
return true
end
end,
},
highlights = {
background = {
guifg = colors.grey_fg,
guibg = colors.black2,
},
-- buffers
buffer_selected = {
guifg = colors.white,
guibg = colors.black,
gui = "bold",
},
buffer_visible = {
guifg = colors.light_grey,
guibg = colors.black2,
},
-- 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,
},
fill = {
guifg = colors.grey_fg,
guibg = colors.black2,
},
indicator_selected = {
guifg = colors.black,
guibg = colors.black,
},
-- modified
modified = {
guifg = colors.red,
guibg = colors.black2,
},
modified_visible = {
guifg = colors.red,
guibg = colors.black2,
},
modified_selected = {
guifg = colors.green,
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,
},
-- 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,
},
},
}