mirror of
https://github.com/genebean/dots.git
synced 2026-03-27 01:17:42 -04:00
Add bufferline
This time around, bufferline has settings added to make it not overlap NeoTree and to look right with my theme set to a transparent background.
This commit is contained in:
parent
2aa2ee3e2f
commit
cbd72735a2
3 changed files with 50 additions and 7 deletions
|
|
@ -19,3 +19,4 @@ vim.keymap.set("n", "<leader>h", ":nohlsearch<CR>")
|
|||
|
||||
vim.wo.relativenumber = true
|
||||
|
||||
vim.o.termguicolors = true
|
||||
|
|
|
|||
|
|
@ -1,7 +0,0 @@
|
|||
return{
|
||||
"akinsho/bufferline.nvim",
|
||||
version = "*",
|
||||
dependencies = "nvim-tree/nvim-web-devicons",
|
||||
event = "BufReadPre",
|
||||
config = true
|
||||
}
|
||||
49
modules/home-manager/files/nvim/lua/plugins/bufferline.lua
Normal file
49
modules/home-manager/files/nvim/lua/plugins/bufferline.lua
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
return {
|
||||
"akinsho/bufferline.nvim",
|
||||
after = "catppuccin",
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
version = "*",
|
||||
config = function()
|
||||
-- Get the color pallet of the theme flavor I am using
|
||||
local color_palette = require("catppuccin.palettes").get_palette("frappe")
|
||||
|
||||
-- Set variables to use the color they'd use if the background was not transparent
|
||||
local bg_highlight = color_palette.crust
|
||||
local separator_fg = color_palette.crust
|
||||
|
||||
require("bufferline").setup({
|
||||
highlights = require("catppuccin.groups.integrations.bufferline").get({
|
||||
-- Copy settings from Catppuccin bufferline integration and override just the
|
||||
-- part that is needed to make it look like it would if the background was not
|
||||
-- set to transparent in catppuccin.lua
|
||||
-- https://github.com/catppuccin/nvim/blob/main/lua/catppuccin/groups/integrations/bufferline.lua
|
||||
custom = {
|
||||
all = {
|
||||
-- this makes the background behind the tabs contrast with the tabs themselves
|
||||
fill = { bg = bg_highlight },
|
||||
|
||||
-- separators
|
||||
-- I am only overriding the foreground as that is what makes the tabs look correct
|
||||
separator = { fg = separator_fg },
|
||||
separator_visible = { fg = separator_fg },
|
||||
separator_selected = { fg = separator_fg },
|
||||
offset_separator = { fg = separator_fg },
|
||||
},
|
||||
},
|
||||
}),
|
||||
options = {
|
||||
mode = "buffers",
|
||||
separator_style = "slant",
|
||||
offsets = {
|
||||
{
|
||||
filetype = "neo-tree",
|
||||
text = "File Explorer",
|
||||
highlight = "Directory",
|
||||
separator = true,
|
||||
},
|
||||
},
|
||||
diagnostics = "nvim_lsp",
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue