2021-03-13 02:23:02 +01:00
|
|
|
vim.o.termguicolors = true
|
2021-03-07 15:22:30 +01:00
|
|
|
|
2021-04-06 04:59:37 +02:00
|
|
|
-- colors for active , inactive uffer tabs
|
2021-03-13 02:23:02 +01:00
|
|
|
require "bufferline".setup {
|
|
|
|
options = {
|
|
|
|
buffer_close_icon = "",
|
|
|
|
modified_icon = "●",
|
2021-03-18 14:49:45 +01: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,
|
|
|
|
tab_size = 18,
|
|
|
|
enforce_regular_tabs = true,
|
|
|
|
view = "multiwindow",
|
|
|
|
show_buffer_close_icons = true,
|
|
|
|
separator_style = "thin"
|
2021-03-07 15:22:30 +01:00
|
|
|
},
|
2021-03-13 02:23:02 +01:00
|
|
|
highlights = {
|
2021-03-07 15:22:30 +01:00
|
|
|
background = {
|
2021-03-13 02:23:02 +01:00
|
|
|
guifg = comment_fg,
|
2021-04-06 04:59:37 +02:00
|
|
|
guibg = "#1e222a"
|
2021-03-13 02:23:02 +01:00
|
|
|
},
|
|
|
|
fill = {
|
|
|
|
guifg = comment_fg,
|
2021-04-06 04:59:37 +02:00
|
|
|
guibg = "#1e222a"
|
2021-03-13 02:23:02 +01:00
|
|
|
},
|
2021-03-07 15:22:30 +01:00
|
|
|
buffer_selected = {
|
2021-03-13 02:23:02 +01:00
|
|
|
guifg = normal_fg,
|
2021-04-06 04:59:37 +02:00
|
|
|
guibg = "#282c34",
|
2021-03-13 02:23:02 +01:00
|
|
|
gui = "bold"
|
|
|
|
},
|
2021-04-06 04:59:37 +02:00
|
|
|
buffer_visible = {
|
|
|
|
guifg = "#3e4451",
|
|
|
|
guibg = "#1e222a"
|
|
|
|
},
|
2021-03-13 02:23:02 +01:00
|
|
|
separator_visible = {
|
2021-04-06 04:59:37 +02:00
|
|
|
guifg = "#1e222a",
|
|
|
|
guibg = "#1e222a"
|
2021-03-07 15:22:30 +01:00
|
|
|
},
|
|
|
|
separator_selected = {
|
2021-04-06 04:59:37 +02:00
|
|
|
guifg = "#1e222a",
|
|
|
|
guibg = "#1e222a"
|
2021-03-13 02:23:02 +01:00
|
|
|
},
|
|
|
|
separator = {
|
2021-04-06 04:59:37 +02:00
|
|
|
guifg = "#1e222a",
|
|
|
|
guibg = "#1e222a"
|
2021-03-13 02:23:02 +01:00
|
|
|
},
|
|
|
|
indicator_selected = {
|
2021-04-06 04:59:37 +02:00
|
|
|
guifg = "#1e222a",
|
|
|
|
guibg = "#1e222a"
|
2021-03-13 02:23:02 +01:00
|
|
|
},
|
2021-03-07 15:22:30 +01:00
|
|
|
modified_selected = {
|
2021-03-13 02:23:02 +01:00
|
|
|
guifg = string_fg,
|
2021-04-06 04:59:37 +02:00
|
|
|
guibg = "#353b45"
|
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}
|
|
|
|
|
|
|
|
vim.g.mapleader = " "
|
|
|
|
|
2021-03-31 11:47:11 +02:00
|
|
|
--command that adds new buffer and moves to it
|
|
|
|
vim.api.nvim_command "com -nargs=? -complete=file_in_path New badd <args> | blast"
|
2021-04-06 04:59:37 +02:00
|
|
|
vim.api.nvim_set_keymap("n", "<S-b>", ":New ", opt)
|
2021-04-01 20:53:12 +02:00
|
|
|
|
2021-03-31 11:47:11 +02:00
|
|
|
--removing a buffer
|
2021-04-06 04:59:37 +02:00
|
|
|
vim.api.nvim_set_keymap("n", "<S-f>", [[<Cmd>bdelete<CR>]], opt)
|
2021-04-01 20:53:12 +02:00
|
|
|
|
2021-03-18 14:49:45 +01:00
|
|
|
-- tabnew and tabprev
|
2021-03-31 11:47:11 +02:00
|
|
|
vim.api.nvim_set_keymap("n", "<S-l>", [[<Cmd>BufferLineCycleNext<CR>]], opt)
|
|
|
|
vim.api.nvim_set_keymap("n", "<S-s>", [[<Cmd>BufferLineCyclePrev<CR>]], opt)
|