mirror of
https://github.com/dcarrillo/dotfiles.git
synced 2026-04-26 20:21:35 +00:00
39 lines
791 B
Lua
39 lines
791 B
Lua
local bufferline = require("bufferline")
|
|
|
|
-- local function is_buffer_loaded(name)
|
|
-- local bufs = vim.api.nvim_list_bufs()
|
|
--
|
|
-- for _, buffer in pairs(bufs) do
|
|
-- if vim.fn.getbufvar(buffer, "&filetype") == name then
|
|
-- return true
|
|
-- end
|
|
-- end
|
|
--
|
|
-- return false
|
|
-- end
|
|
|
|
bufferline.setup({
|
|
options = {
|
|
close_command = "Bdelete! %d",
|
|
right_mouse_command = "Bdelete! %d",
|
|
offsets = {
|
|
{ filetype = "snacks_picker_list", text = "", padding = 1 },
|
|
},
|
|
indicator = {
|
|
style = "underline",
|
|
},
|
|
hover = {
|
|
enabled = false,
|
|
},
|
|
separator_style = "slant",
|
|
|
|
custom_areas = {
|
|
left = function()
|
|
local text = " " .. string.gsub(vim.loop.cwd(), "^" .. os.getenv("HOME"), "~") .. " "
|
|
|
|
return { { text = text, fg = "#adbac7" } }
|
|
end,
|
|
},
|
|
},
|
|
})
|