summaryrefslogtreecommitdiff
path: root/.config/nvim/lua/_bufferline
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2021-03-15 23:26:50 +0100
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2021-03-15 23:26:50 +0100
commit855f4e4f0f22b35641f13614e46b9ab7f6818188 (patch)
tree9a776e07429c16e1df68f4b04c125c46185eed16 /.config/nvim/lua/_bufferline
parent8577c3b7cba714551d3537f3337ee2490bd20106 (diff)
Migration to lua
Diffstat (limited to '.config/nvim/lua/_bufferline')
-rw-r--r--.config/nvim/lua/_bufferline/init.lua28
1 files changed, 28 insertions, 0 deletions
diff --git a/.config/nvim/lua/_bufferline/init.lua b/.config/nvim/lua/_bufferline/init.lua
new file mode 100644
index 0000000..ab7ecae
--- /dev/null
+++ b/.config/nvim/lua/_bufferline/init.lua
@@ -0,0 +1,28 @@
+require'bufferline'.setup{
+ options = {
+ view = "default",
+ numbers = "none",
+ number_style = "superscript",
+ mappings = false,
+ buffer_close_icon= '',
+ modified_icon = '●',
+ close_icon = '',
+ left_trunc_marker = '',
+ right_trunc_marker = '',
+ max_name_length = 18,
+ max_prefix_length = 15, -- prefix used when a buffer is deduplicated
+ tab_size = 18,
+ diagnostics = "nvim_lsp",
+ show_buffer_close_icons = true,
+ show_tab_indicators = true,
+ persist_buffer_sort = true, -- whether or not custom sorted buffers should persist
+ -- can also be a table containing 2 custom separators
+ -- [focused and unfocused]. eg: { '|', '|' }
+ separator_style = "thin",
+ enforce_regular_tabs = false,
+ always_show_bufferline = true,
+ sort_by = 'relative_directory'
+ }
+}
+vim.api.nvim_set_keymap('n', '<TAB>', ':BufferLineCycleNext<CR>', { noremap = true, silent = true })
+vim.api.nvim_set_keymap('n', '<S-TAB>', ':BufferLineCyclePrev<CR>', { noremap = true, silent = true })