Merge pull request #783 from venkyr77/catppuccin-bufferline-integration

tabline/bufferline: add catppuccin integration
This commit is contained in:
raf 2025-04-04 10:02:16 +00:00 committed by GitHub
commit 335f24a841
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 15 additions and 4 deletions

View file

@ -292,7 +292,7 @@
- Add lint (luacheck) and formatting (stylua) support for Lua.
- Add lint (markdownlint-cli2) support for Markdown.
- Add catppuccin integration for Lspsaga.
- Add catppuccin integration for Bufferline, Lspsaga.
[tebuevd](https://github.com/tebuevd):

View file

@ -9,7 +9,7 @@
inherit (lib.nvim.lua) toLuaObject;
cfg = config.vim.tabline.nvimBufferline;
self = import ./nvim-bufferline.nix {inherit lib;};
self = import ./nvim-bufferline.nix {inherit config lib;};
inherit (self.options.vim.tabline.nvimBufferline) mappings;
in {
config = mkIf cfg.enable {

View file

@ -1,4 +1,8 @@
{lib, ...}: let
{
config,
lib,
...
}: let
inherit (lib.options) mkOption mkEnableOption literalExpression;
inherit (lib.types) enum bool either nullOr str int listOf attrs;
inherit (lib.generators) mkLuaInline;
@ -23,7 +27,14 @@ in {
setupOpts = mkPluginSetupOption "Bufferline-nvim" {
highlights = mkOption {
type = either attrs luaInline;
default = {};
default =
if config.vim.theme.enable && config.vim.theme.name == "catppuccin"
then
mkLuaInline
''
require("catppuccin.groups.integrations.bufferline").get()
''
else {};
description = ''
Overrides the highlight groups of bufferline.