fix nvim: barbar
This commit is contained in:
parent
fe668d4424
commit
3e138a5f5e
@ -5,24 +5,46 @@ return {
|
|||||||
-- 'lewis6991/gitsigns.nvim', -- OPTIONAL: for git status
|
-- 'lewis6991/gitsigns.nvim', -- OPTIONAL: for git status
|
||||||
'nvim-tree/nvim-web-devicons', -- OPTIONAL: for file icons
|
'nvim-tree/nvim-web-devicons', -- OPTIONAL: for file icons
|
||||||
},
|
},
|
||||||
|
lazy = false,
|
||||||
init = function() vim.g.barbar_auto_setup = false end,
|
init = function() vim.g.barbar_auto_setup = false end,
|
||||||
-- opts = {
|
opts = {
|
||||||
-- -- lazy.nvim will automatically call setup for you. put your options here, anything missing will use the default:
|
-- lazy.nvim will automatically call setup for you. put your options here, anything missing will use the default:
|
||||||
-- -- animation = false,
|
auto_hide = -1,
|
||||||
-- -- insert_at_start = true,
|
clickable = true,
|
||||||
-- -- …etc.
|
icons = {
|
||||||
-- },
|
buffer_index = false,
|
||||||
config = function(_, opts)
|
buffer_number = false,
|
||||||
require'bufferline'.setup {
|
button = '',
|
||||||
-- animation = false, -- 禁用動畫效果
|
diagnostics = {{enabled = true}, {enabled = true}},
|
||||||
sidebar_filetypes = {
|
filetype = {enabled = true},
|
||||||
['neo-tree'] = {event = 'BufWipeout'},
|
separator = {left = '▎', right = ''},
|
||||||
undotree = {
|
-- separator = {left = '', right = ''},
|
||||||
text = 'undotree',
|
},
|
||||||
align = 'center', -- *optionally* specify an alignment (either 'left', 'center', or 'right')
|
sidebar_filetypes = {
|
||||||
},
|
['neo-tree'] = {event = 'BufWipeout'},
|
||||||
|
undotree = {
|
||||||
|
text = 'undotree',
|
||||||
|
align = 'center', -- *optionally* specify an alignment (either 'left', 'center', or 'right')
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
|
-- icons = {current = {filetype = {enabled = false}}},
|
||||||
|
-- maximum_padding = math.huge,
|
||||||
|
-- animation = false,
|
||||||
|
-- insert_at_start = true,
|
||||||
|
-- …etc.
|
||||||
|
},
|
||||||
|
config = function(_, opts)
|
||||||
|
-- require'bufferline'.setup {
|
||||||
|
-- -- animation = false, -- 禁用動畫效果
|
||||||
|
-- sidebar_filetypes = {
|
||||||
|
-- ['neo-tree'] = {event = 'BufWipeout'},
|
||||||
|
-- undotree = {
|
||||||
|
-- text = 'undotree',
|
||||||
|
-- align = 'center', -- *optionally* specify an alignment (either 'left', 'center', or 'right')
|
||||||
|
-- },
|
||||||
|
-- },
|
||||||
|
-- }
|
||||||
|
require('barbar').setup(opts)
|
||||||
|
|
||||||
-- 重定義 :q 命令為僅關閉當前 Buffer
|
-- 重定義 :q 命令為僅關閉當前 Buffer
|
||||||
vim.api.nvim_create_user_command('Q', function()
|
vim.api.nvim_create_user_command('Q', function()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user