refactor: bufferline replaced + minor styling improvements WIP
This commit is contained in:
@@ -3,12 +3,21 @@
|
||||
-- ╰─────────╯
|
||||
return {
|
||||
{
|
||||
"akinsho/bufferline.nvim",
|
||||
version = "*",
|
||||
dependencies = "nvim-tree/nvim-web-devicons",
|
||||
opts = function()
|
||||
return require("plugins.opts.bufferline")
|
||||
"romgrk/barbar.nvim",
|
||||
dependencies = {
|
||||
"lewis6991/gitsigns.nvim", -- OPTIONAL: for git status
|
||||
"nvim-tree/nvim-web-devicons", -- OPTIONAL: for file icons
|
||||
},
|
||||
init = function()
|
||||
vim.g.barbar_auto_setup = false
|
||||
end,
|
||||
config = function(_, opts)
|
||||
require("barbar").setup(opts)
|
||||
end,
|
||||
opts = {
|
||||
animation = false,
|
||||
},
|
||||
version = "^1.0.0", -- optional: only update when a new 1.x version is released
|
||||
},
|
||||
|
||||
-- Have buffers by tab
|
||||
|
||||
@@ -1,118 +0,0 @@
|
||||
local config = {
|
||||
highlights = {
|
||||
buffer_selected = { bold = true },
|
||||
diagnostic_selected = { bold = true },
|
||||
info_selected = { bold = true },
|
||||
info_diagnostic_selected = { bold = true },
|
||||
warning_selected = { bold = true },
|
||||
warning_diagnostic_selected = { bold = true },
|
||||
error_selected = { bold = true },
|
||||
error_diagnostic_selected = { bold = true },
|
||||
},
|
||||
options = {
|
||||
themeable = true,
|
||||
numbers = "none",
|
||||
diagnostics = false, -- or "nvim_lsp", "coc"
|
||||
max_prefix_length = 8,
|
||||
close_command = "b# | bd#",
|
||||
right_mouse_command = "b# | bd#",
|
||||
left_mouse_command = "buffer %d",
|
||||
buffer_close_icon = "",
|
||||
modified_icon = "●",
|
||||
close_icon = "",
|
||||
left_trunc_marker = "",
|
||||
right_trunc_marker = "",
|
||||
max_name_length = 18,
|
||||
truncate_names = true,
|
||||
tab_size = 18,
|
||||
color_icons = true,
|
||||
show_buffer_icons = true,
|
||||
show_buffer_close_icons = true,
|
||||
show_tab_indicators = true,
|
||||
duplicates_across_groups = true, -- whether to consider duplicate paths in different groups as duplicates
|
||||
persist_buffer_sort = true, -- whether or not custom sorted buffers should persist
|
||||
separator_style = { "▍", "" }, -- { "▏", "" } | "slant" | "slope" | "thick" | "thin" | { 'any', 'any' },
|
||||
-- always_show_bufferline = false,
|
||||
auto_toggle_bufferline = true,
|
||||
show_close_icon = true,
|
||||
hover = {
|
||||
enabled = true,
|
||||
delay = 200,
|
||||
reveal = { "close" },
|
||||
},
|
||||
offsets = {
|
||||
{
|
||||
filetype = "neo-tree",
|
||||
text = "", -- , ,
|
||||
highlight = "Filler",
|
||||
|
||||
-- text = function()
|
||||
-- return vim.fn.getcwd()
|
||||
-- end,
|
||||
-- highlight = "Directory",
|
||||
-- text_align = "left",
|
||||
separator = "", -- use a "true" to enable the default, or set your own character
|
||||
},
|
||||
},
|
||||
groups = {
|
||||
options = {
|
||||
toggle_hidden_on_enter = true, -- when you re-enter a hidden group this options re-opens that group so the buffer is visible
|
||||
},
|
||||
items = {
|
||||
-- {
|
||||
-- name = "Tests",
|
||||
-- -- icon = " ",
|
||||
-- highlight = { underline = false },
|
||||
-- priority = 2,
|
||||
-- matcher = function(buf)
|
||||
-- return buf.path:match("%.test") or buf.path:match("%_test") or buf.path:match("%_spec")
|
||||
-- end,
|
||||
-- },
|
||||
-- {
|
||||
-- name = "Docs",
|
||||
-- -- icon = " ",
|
||||
-- priority = 3,
|
||||
-- -- highlight = { undercurl = false, sp = "grey" },
|
||||
-- highlight = { undercurl = false },
|
||||
-- auto_close = false,
|
||||
-- matcher = function(buf)
|
||||
-- return buf.path:match("%.md") or buf.path:match("%.txt")
|
||||
-- end,
|
||||
-- separator = {
|
||||
-- style = require("bufferline.groups").separator.tab,
|
||||
-- },
|
||||
-- },
|
||||
{
|
||||
name = "Sh",
|
||||
-- icon = " ",
|
||||
highlight = { undercurl = false },
|
||||
auto_close = false,
|
||||
priority = 4,
|
||||
matcher = function(buf)
|
||||
return buf.path:match("zsh")
|
||||
end,
|
||||
separator = {
|
||||
style = require("bufferline.groups").separator.tab,
|
||||
},
|
||||
},
|
||||
{
|
||||
name = "Container",
|
||||
highlight = { undercurl = false },
|
||||
auto_close = false,
|
||||
-- icon = " ",
|
||||
matcher = function(buf)
|
||||
return buf.path:match("dockerfile")
|
||||
or buf.path:match("DOCKERFILE")
|
||||
or buf.path:match("Dockerfile")
|
||||
or buf.path:match("docker%-compose%.yml")
|
||||
end,
|
||||
separator = {
|
||||
style = require("bufferline.groups").separator.tab,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
return config
|
||||
@@ -57,7 +57,7 @@ return {
|
||||
invert_signs = false,
|
||||
invert_tabline = false,
|
||||
inverse = true, -- invert background for search, diffs, statuslines and errors
|
||||
contrast = "", -- can be "hard", "soft" or empty string
|
||||
contrast = "soft", -- can be "hard", "soft" or empty string
|
||||
palette_overrides = {},
|
||||
overrides = {},
|
||||
dim_inactive = false,
|
||||
|
||||
Reference in New Issue
Block a user