-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathbufferline.lua
More file actions
81 lines (81 loc) · 1.94 KB
/
bufferline.lua
File metadata and controls
81 lines (81 loc) · 1.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
local bufferline = require("bufferline")
bufferline.setup({
options = {
mode = "buffers",
style_preset = bufferline.style_preset.minimal,
-- 使用 nvim 内置lsp
diagnostics = "nvim_lsp",
diagnostics_indicator = function(count, level, diagnostics_dict, context)
local s = " "
for e, n in pairs(diagnostics_dict) do
local sym = e == "error" and " " or (e == "warning" and " " or " ")
s = s .. n .. sym
end
return s
end,
-- 左侧让出 nvim-tree 的位置
offsets = {
{
filetype = "NvimTree",
text = function()
return "File Explorer"
end,
padding = 1,
highlight = "Directory",
-- text_align = "center"
text_align = "left",
},
{
filetype = "DiffviewFiles",
text = function()
return "DiffviewFilePanel"
end,
padding = 1,
highlight = "Directory",
-- text_align = "center"
text_align = "left",
},
{
filetype = "Outline",
text = " Outline",
padding = 1,
highlight = "Directory",
text_align = "left",
},
{
filetype = "flutterToolsOutline",
text = " Outline",
padding = 1,
highlight = "Directory",
text_align = "left",
},
{
filetype = "dapui_watches",
text = "Debug",
padding = 1,
highlight = "Directory",
text_align = "left",
},
{
filetype = "dbui",
text = "Databases",
padding = 1,
highlight = "Directory",
text_align = "left",
},
{
filetype = "JavaProjects",
text = " JavaProjects",
padding = 1,
highlight = "Directory",
text_align = "left",
},
},
indicator = {
style = "none",
},
color_icons = true,
show_buffer_close_icons = true,
show_close_icon = false,
},
})