neovim-confs/lua/plugins/configs/bufferline.lua

51 lines
1.3 KiB
Lua
Raw Normal View History

local present, bufferline = pcall(require, "bufferline")
if not present then
return
end
local options = {
options = {
offsets = { { filetype = "NvimTree", text = "", padding = 1 } },
buffer_close_icon = "",
modified_icon = "",
close_icon = "",
2021-08-27 12:30:44 +02:00
show_close_icon = true,
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,
2021-11-17 06:30:57 +01:00
diagnostics = false,
themable = 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
end
return true
end
2021-11-17 06:30:57 +01:00
return true
end,
},
2021-03-07 15:22:30 +01:00
}
-- check for any override
options = require("core.utils").load_override(options, "akinsho/bufferline.nvim")
bufferline.setup(options)