Moving to individual plugin files for lazy
Signed-off-by: Taken <taken@mairimashita.org>
This commit is contained in:
@@ -1,69 +1,74 @@
|
||||
local setup, bufferline = pcall(require, "bufferline")
|
||||
if not setup then
|
||||
return
|
||||
end
|
||||
return {
|
||||
"akinsho/bufferline.nvim",
|
||||
version = "*",
|
||||
dependencies = "nvim-tree/nvim-web-devicons",
|
||||
config = function()
|
||||
local bufferline = require("bufferline")
|
||||
|
||||
bufferline.setup({
|
||||
options = {
|
||||
mode = "buffers",
|
||||
style_preset = bufferline.style_preset.default,
|
||||
themable = true,
|
||||
numbers = "none",
|
||||
close_command = "bdelete! %d",
|
||||
indicator = {
|
||||
icon = "▎",
|
||||
style = "icon",
|
||||
},
|
||||
max_name_length = 18,
|
||||
max_prefix_length = 15,
|
||||
truncate_names = true,
|
||||
tab_size = 18,
|
||||
offsets = {
|
||||
{
|
||||
filetype = "NvimTree",
|
||||
text = "File Explorer",
|
||||
highlight = "None",
|
||||
padding = 1,
|
||||
},
|
||||
},
|
||||
color_icons = true,
|
||||
get_element_icon = function(element)
|
||||
local icon, hl = require("nvim-web-devicons").get_icon_by_filetype(element.filetype, { default = false })
|
||||
return icon, hl
|
||||
end,
|
||||
always_show_bufferline = true,
|
||||
diagnostics = "nvim_lsp",
|
||||
diagnostics_update_in_insert = false,
|
||||
diagnostics_indicator = function(count, level, diagnostics_dict, context)
|
||||
if context.buffer:current() then
|
||||
return ""
|
||||
end
|
||||
bufferline.setup({
|
||||
options = {
|
||||
mode = "buffers",
|
||||
style_preset = bufferline.style_preset.default,
|
||||
themable = true,
|
||||
numbers = "none",
|
||||
close_command = "bdelete! %d",
|
||||
indicator = {
|
||||
icon = "▎",
|
||||
style = "icon",
|
||||
},
|
||||
max_name_length = 18,
|
||||
max_prefix_length = 15,
|
||||
truncate_names = true,
|
||||
tab_size = 18,
|
||||
offsets = {
|
||||
{
|
||||
filetype = "NvimTree",
|
||||
text = "File Explorer",
|
||||
highlight = "None",
|
||||
padding = 1,
|
||||
},
|
||||
},
|
||||
color_icons = true,
|
||||
get_element_icon = function(element)
|
||||
local icon, hl =
|
||||
require("nvim-web-devicons").get_icon_by_filetype(element.filetype, { default = false })
|
||||
return icon, hl
|
||||
end,
|
||||
always_show_bufferline = true,
|
||||
diagnostics = "nvim_lsp",
|
||||
diagnostics_update_in_insert = false,
|
||||
diagnostics_indicator = function(count, level, diagnostics_dict, context)
|
||||
if context.buffer:current() then
|
||||
return ""
|
||||
end
|
||||
|
||||
return ""
|
||||
end,
|
||||
highlights = {
|
||||
background = {
|
||||
guibg = "None",
|
||||
return ""
|
||||
end,
|
||||
highlights = {
|
||||
background = {
|
||||
guibg = "None",
|
||||
},
|
||||
fill = {
|
||||
guibg = "None",
|
||||
},
|
||||
close_button = {
|
||||
guibg = "None",
|
||||
},
|
||||
separator_visible = {
|
||||
guibg = "None",
|
||||
},
|
||||
tab_close = {
|
||||
guibg = "None",
|
||||
},
|
||||
},
|
||||
},
|
||||
fill = {
|
||||
guibg = "None",
|
||||
},
|
||||
close_button = {
|
||||
guibg = "None",
|
||||
},
|
||||
separator_visible = {
|
||||
guibg = "None",
|
||||
},
|
||||
tab_close = {
|
||||
guibg = "None",
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
})
|
||||
|
||||
vim.g.transparent_groups = vim.list_extend(
|
||||
vim.g.transparent_groups or {},
|
||||
vim.tbl_map(function(v)
|
||||
return v.hl_group
|
||||
end, vim.tbl_values(require("bufferline.config").highlights))
|
||||
)
|
||||
vim.g.transparent_groups = vim.list_extend(
|
||||
vim.g.transparent_groups or {},
|
||||
vim.tbl_map(function(v)
|
||||
return v.hl_group
|
||||
end, vim.tbl_values(require("bufferline.config").highlights))
|
||||
)
|
||||
end,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user