2021-03-13 02:23:02 +01:00
|
|
|
require "bufferline".setup {
|
|
|
|
options = {
|
2021-06-14 04:27:56 +02:00
|
|
|
offsets = {{filetype = "NvimTree", text = "", padding = 1}},
|
2021-03-13 02:23:02 +01:00
|
|
|
buffer_close_icon = "",
|
2021-04-26 10:14:51 +02:00
|
|
|
modified_icon = "",
|
2021-06-14 04:27:56 +02:00
|
|
|
close_icon = "",
|
2021-03-13 02:23:02 +01:00
|
|
|
left_trunc_marker = "",
|
|
|
|
right_trunc_marker = "",
|
|
|
|
max_name_length = 14,
|
|
|
|
max_prefix_length = 13,
|
2021-05-06 16:19:02 +02:00
|
|
|
tab_size = 20,
|
2021-05-09 12:23:59 +02:00
|
|
|
show_tab_indicators = true,
|
|
|
|
enforce_regular_tabs = false,
|
2021-03-13 02:23:02 +01:00
|
|
|
view = "multiwindow",
|
|
|
|
show_buffer_close_icons = true,
|
2021-05-09 12:23:59 +02:00
|
|
|
separator_style = "thin",
|
|
|
|
mappings = "true"
|
2021-03-13 02:23:02 +01:00
|
|
|
}
|
2021-03-07 15:22:30 +01:00
|
|
|
}
|
2021-03-18 14:49:45 +01:00
|
|
|
|
|
|
|
local opt = {silent = true}
|
2021-04-25 08:27:24 +02:00
|
|
|
local map = vim.api.nvim_set_keymap
|
2021-03-18 14:49:45 +01:00
|
|
|
vim.g.mapleader = " "
|
|
|
|
|
2021-05-09 12:23:59 +02: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 20:53:12 +02:00
|
|
|
|
2021-05-09 12:23:59 +02:00
|
|
|
-- move between tabs
|
2021-05-09 07:57:38 +02:00
|
|
|
map("n", "<TAB>", [[<Cmd>BufferLineCycleNext<CR>]], opt)
|
|
|
|
map("n", "<S-TAB>", [[<Cmd>BufferLineCyclePrev<CR>]], opt)
|