cap153_nvim/lua/lazy/plugins/topbar.lua
2026-02-27 19:13:55 +08:00

49 lines
1.1 KiB
Lua
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-- ===
-- === 文件缓冲标签栏
-- ===
local map = require("core.keymap")
-- 新建空缓冲区貌似是neovim自带的
map:cmd('tu', 'enew')
-- 关闭当前缓冲区貌似是neovim自带的完整命令bdelete
map:cmd('tq', 'bd')
-- 在缓冲区之间移动
map:cmd('tn', 'BufferLineCyclePrev')
map:cmd('ti', 'BufferLineCycleNext')
-- 移动缓冲区的位置
map:cmd('tmn', 'BufferLineMovePrev')
map:cmd('tmi', 'BufferLineMoveNext')
-- 关闭缓冲区
map:cmd('tN', 'BufferLineCloseLeft')
map:cmd('tI', 'BufferLineCloseRight')
map:cmd('tQ', 'BufferLineCloseOthers')
return {
"akinsho/bufferline.nvim",
config = function()
require("bufferline").setup {
options = {
modified_icon = "",
buffer_close_icon = "×",
-- show_buffer_close_icons = false,
max_name_length = 14,
max_prefix_length = 13,
tab_size = 10,
indicator = {
style = "none",
},
},
}
end,
}
-- return {
-- 'akinsho/bufferline.nvim',
-- version = "*",-- 安装最新的稳定版
-- dependencies = 'kyazdani42/nvim-web-devicons',
-- config = function()
-- require("bufferline").setup {}
-- end
-- }