2021-05-09 11:23:59 +01:00
|
|
|
-- define some colors
|
2021-04-25 07:27:24 +01:00
|
|
|
|
|
|
|
local bar_fg = "#565c64"
|
|
|
|
local activeBuffer_fg = "#c8ccd4"
|
|
|
|
|
2021-03-13 01:23:02 +00:00
|
|
|
require "bufferline".setup {
|
|
|
|
options = {
|
2021-06-01 19:49:58 +01:00
|
|
|
offsets = {{filetype = "NvimTree", text = ""}},
|
2021-03-13 01:23:02 +00:00
|
|
|
buffer_close_icon = "",
|
2021-04-26 09:14:51 +01:00
|
|
|
modified_icon = "",
|
2021-05-09 11:23:59 +01:00
|
|
|
close_icon = " ",
|
2021-03-13 01:23:02 +00:00
|
|
|
left_trunc_marker = "",
|
|
|
|
right_trunc_marker = "",
|
|
|
|
max_name_length = 14,
|
|
|
|
max_prefix_length = 13,
|
2021-05-06 15:19:02 +01:00
|
|
|
tab_size = 20,
|
2021-05-09 11:23:59 +01:00
|
|
|
show_tab_indicators = true,
|
|
|
|
enforce_regular_tabs = false,
|
2021-03-13 01:23:02 +00:00
|
|
|
view = "multiwindow",
|
|
|
|
show_buffer_close_icons = true,
|
2021-05-09 11:23:59 +01:00
|
|
|
separator_style = "thin",
|
|
|
|
mappings = "true"
|
2021-03-07 14:22:30 +00:00
|
|
|
},
|
2021-06-01 19:49:58 +01:00
|
|
|
|
2021-05-09 11:23:59 +01:00
|
|
|
-- bar colors!!
|
2021-03-13 01:23:02 +00:00
|
|
|
highlights = {
|
2021-05-09 11:23:59 +01:00
|
|
|
fill = {
|
2021-04-25 07:27:24 +01:00
|
|
|
guifg = bar_fg,
|
2021-05-09 11:23:59 +01:00
|
|
|
guibg = "#252931"
|
2021-03-13 01:23:02 +00:00
|
|
|
},
|
2021-05-09 11:23:59 +01:00
|
|
|
background = {
|
2021-04-25 07:27:24 +01:00
|
|
|
guifg = bar_fg,
|
2021-05-09 11:23:59 +01:00
|
|
|
guibg = "#252931"
|
2021-03-13 01:23:02 +00:00
|
|
|
},
|
2021-06-01 19:49:58 +01:00
|
|
|
|
2021-05-09 11:23:59 +01:00
|
|
|
-- buffer
|
2021-03-07 14:22:30 +00:00
|
|
|
buffer_selected = {
|
2021-04-25 07:27:24 +01:00
|
|
|
guifg = activeBuffer_fg,
|
2021-05-06 15:19:02 +01:00
|
|
|
guibg = "#1e222a",
|
2021-03-13 01:23:02 +00:00
|
|
|
gui = "bold"
|
|
|
|
},
|
2021-04-06 03:59:37 +01:00
|
|
|
buffer_visible = {
|
2021-04-25 07:27:24 +01:00
|
|
|
guifg = "#9298a0",
|
2021-05-09 11:23:59 +01:00
|
|
|
guibg = "#252931"
|
2021-04-06 03:59:37 +01:00
|
|
|
},
|
2021-06-01 19:49:58 +01:00
|
|
|
|
2021-05-09 11:23:59 +01:00
|
|
|
-- tabs over right
|
|
|
|
tab = {
|
|
|
|
guifg = "#9298a0",
|
|
|
|
guibg = "#30343c"
|
|
|
|
},
|
2021-06-01 19:49:58 +01:00
|
|
|
tab_selected = {
|
2021-05-09 11:23:59 +01:00
|
|
|
guifg = "#30343c",
|
|
|
|
guibg = "#9298a0"
|
2021-03-13 01:23:02 +00:00
|
|
|
},
|
2021-06-01 19:49:58 +01:00
|
|
|
tab_close = {
|
|
|
|
guifg = "#d47d85",
|
2021-05-09 11:23:59 +01:00
|
|
|
guibg = "#252931"
|
|
|
|
},
|
2021-06-01 19:49:58 +01:00
|
|
|
|
2021-05-09 11:23:59 +01:00
|
|
|
-- buffer separators
|
2021-03-13 01:23:02 +00:00
|
|
|
separator = {
|
2021-05-09 11:23:59 +01:00
|
|
|
guifg = "#252931",
|
|
|
|
guibg = "#252931"
|
|
|
|
},
|
|
|
|
separator_selected = {
|
|
|
|
guifg = "#1e222a",
|
|
|
|
guibg = "#1e222a"
|
|
|
|
},
|
|
|
|
separator_visible = {
|
|
|
|
guifg = "#252931",
|
|
|
|
guibg = "#252931"
|
2021-03-13 01:23:02 +00:00
|
|
|
},
|
2021-06-01 19:49:58 +01:00
|
|
|
|
2021-03-13 01:23:02 +00:00
|
|
|
indicator_selected = {
|
2021-05-09 11:23:59 +01:00
|
|
|
guifg = "#252931",
|
|
|
|
guibg = "#252931"
|
2021-03-13 01:23:02 +00:00
|
|
|
},
|
2021-06-01 19:49:58 +01:00
|
|
|
|
2021-05-09 11:23:59 +01:00
|
|
|
-- modified files (but not saved)
|
2021-03-07 14:22:30 +00:00
|
|
|
modified_selected = {
|
2021-05-06 15:19:02 +01:00
|
|
|
guifg = "#A3BE8C",
|
|
|
|
guibg = "#1e222a"
|
2021-05-09 11:23:59 +01:00
|
|
|
},
|
|
|
|
modified_visible = {
|
|
|
|
guifg = "#BF616A",
|
|
|
|
guibg = "#23272f"
|
2021-03-13 01:23:02 +00:00
|
|
|
}
|
|
|
|
}
|
2021-03-07 14:22:30 +00:00
|
|
|
}
|
2021-03-18 13:49:45 +00:00
|
|
|
|
|
|
|
local opt = {silent = true}
|
2021-04-25 07:27:24 +01:00
|
|
|
local map = vim.api.nvim_set_keymap
|
2021-03-18 13:49:45 +00:00
|
|
|
vim.g.mapleader = " "
|
|
|
|
|
2021-05-09 11:23:59 +01:00
|
|
|
-- MAPPINGS
|
|
|
|
map("n", "<S-t>", [[<Cmd>tabnew<CR>]], opt) -- new tab
|
|
|
|
map("n", "<S-x>", [[<Cmd>bdelete<CR>]], opt) -- close tab
|
2021-04-01 19:53:12 +01:00
|
|
|
|
2021-05-09 11:23:59 +01:00
|
|
|
-- move between tabs
|
2021-05-09 06:57:38 +01:00
|
|
|
map("n", "<TAB>", [[<Cmd>BufferLineCycleNext<CR>]], opt)
|
|
|
|
map("n", "<S-TAB>", [[<Cmd>BufferLineCyclePrev<CR>]], opt)
|