Tune bufferline and tmux window movement
This commit is contained in:
@@ -218,7 +218,7 @@ end,
|
||||
requires = "nvim-tree/nvim-web-devicons",
|
||||
after = "onedark.nvim",
|
||||
config = function()
|
||||
require("bufferline").setup()
|
||||
require("tracer.plugins.bufferline")
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
79
nvim/lua/tracer/plugins/bufferline.lua
Normal file
79
nvim/lua/tracer/plugins/bufferline.lua
Normal file
@@ -0,0 +1,79 @@
|
||||
require("bufferline").setup({
|
||||
options = {
|
||||
indicator = {
|
||||
icon = " ",
|
||||
},
|
||||
show_close_icon = false,
|
||||
tab_size = 0,
|
||||
max_name_length = 25,
|
||||
offsets = {
|
||||
{
|
||||
filetype = "NvimTree",
|
||||
text = " Files",
|
||||
highlight = "StatusLine",
|
||||
text_align = "left",
|
||||
},
|
||||
},
|
||||
separator_style = "slant",
|
||||
modified_icon = "",
|
||||
custom_areas = {
|
||||
left = function()
|
||||
return {
|
||||
{ text = " ", fg = "#8fff6d" },
|
||||
}
|
||||
end,
|
||||
},
|
||||
},
|
||||
highlights = {
|
||||
fill = {
|
||||
bg = { attribute = "bg", highlight = "StatusLine" },
|
||||
},
|
||||
background = {
|
||||
bg = { attribute = "bg", highlight = "StatusLine" },
|
||||
},
|
||||
tab = {
|
||||
bg = { attribute = "bg", highlight = "StatusLine" },
|
||||
},
|
||||
tab_close = {
|
||||
bg = { attribute = "bg", highlight = "StatusLine" },
|
||||
},
|
||||
close_button = {
|
||||
bg = { attribute = "bg", highlight = "StatusLine" },
|
||||
fg = { attribute = "fg", highlight = "StatusLineNonText" },
|
||||
},
|
||||
close_button_visible = {
|
||||
bg = { attribute = "bg", highlight = "StatusLine" },
|
||||
fg = { attribute = "fg", highlight = "StatusLineNonText" },
|
||||
},
|
||||
close_button_selected = {
|
||||
fg = { attribute = "fg", highlight = "StatusLineNonText" },
|
||||
},
|
||||
buffer_visible = {
|
||||
bg = { attribute = "bg", highlight = "StatusLine" },
|
||||
},
|
||||
modified = {
|
||||
bg = { attribute = "bg", highlight = "StatusLine" },
|
||||
},
|
||||
modified_visible = {
|
||||
bg = { attribute = "bg", highlight = "StatusLine" },
|
||||
},
|
||||
duplicate = {
|
||||
bg = { attribute = "bg", highlight = "StatusLine" },
|
||||
},
|
||||
duplicate_visible = {
|
||||
bg = { attribute = "bg", highlight = "StatusLine" },
|
||||
},
|
||||
separator = {
|
||||
fg = { attribute = "bg", highlight = "StatusLine" },
|
||||
bg = { attribute = "bg", highlight = "StatusLine" },
|
||||
},
|
||||
separator_selected = {
|
||||
fg = { attribute = "bg", highlight = "StatusLine" },
|
||||
bg = { attribute = "bg", highlight = "Normal" },
|
||||
},
|
||||
separator_visible = {
|
||||
fg = { attribute = "bg", highlight = "StatusLine" },
|
||||
bg = { attribute = "bg", highlight = "StatusLine" },
|
||||
},
|
||||
},
|
||||
})
|
||||
@@ -47,6 +47,9 @@ bind m if -F '#{mouse}' \
|
||||
'set -g mouse off; display-message "mouse: off"' \
|
||||
'set -g mouse on; display-message "mouse: on"'
|
||||
|
||||
# Move current window left/right like tabs
|
||||
bind -n S-Left swap-window -t -1
|
||||
bind -n S-Right swap-window -t +1
|
||||
|
||||
set -g status-right ""
|
||||
# Tmux Plugin Manager
|
||||
@@ -54,7 +57,6 @@ set -g @plugin 'tmux-plugins/tpm'
|
||||
set -g @plugin 'tmux-plugins/tmux-resurrect'
|
||||
set -g @plugin 'tmux-plugins/tmux-continuum'
|
||||
|
||||
|
||||
# Continuum settings
|
||||
set -g @continuum-restore 'on' # Auto-restore on tmux startup
|
||||
set -g @continuum-save-interval '15' # Auto-save every 15 minutes
|
||||
|
||||
Reference in New Issue
Block a user