dotfiles/tools/nvim/lua/plugins/mod/bufferline.lua
js0ny 2248d3a237 nvim changes
* refractor(nvim-lualine): lualine in powerline style
* feat(nvim, emacs): Org Mode Integrations Setup
* feat(nvim): C-w keymaps
* feat(wezterm): Change tab bar to top
* feat(nvim): catppuccin integrations
* feat(nvim-cmp): Icon supports
2025-02-09 18:27:53 +00:00

30 lines
1 KiB
Lua

return {
"akinsho/bufferline.nvim",
dependencies = "nvim-tree/nvim-web-devicons", -- 图标支持
after = "catppuccin",
config = function()
require("bufferline").setup({
options = {
indicator = {
icon = "", -- this should be omitted if indicator style is not 'icon'
style = "icon",
},
diagnostics = "nvim_lsp",
diagnostics_indicator = function(count, level, diagnostics_dict, context)
local icon = level:match("error") and "" or ""
return " " .. icon .. count
end,
show_buffer_icons = true,
numbers = "ordinal", -- 显示 buffer 序号
close_command = "bdelete! %d", -- 关闭 buffer 的命令
right_mouse_command = "bdelete! %d", -- 右键关闭
offsets = {
{ filetype = "NvimTree", text = "资源管理器", text_align = "center" },
},
separator_style = "thin",
},
highlights = require("catppuccin.groups.integrations.bufferline").get(),
})
end,
}