plugin/theme: add tabby plugin

This commit is contained in:
Dmitriy Pleshevskiy 2022-09-19 18:44:57 +03:00
parent 05553b6fa0
commit 2a8cf3de04
Signed by: pleshevskiy
GPG key ID: 1B59187B161C0215
5 changed files with 61 additions and 11 deletions

View file

@ -1,5 +1,6 @@
{ enableBarBar ? false
, enableDevIcons ? false
{ enableDevIcons ? false
, enableBarBar ? false
, enableTabby ? false
, wrapNeovim
, neovim-unwrapped
, vimPlugins
@ -19,7 +20,7 @@ let
./plugins/git
./plugins/explorer
(import ./plugins/theme {
inherit enableBarBar enableDevIcons;
inherit enableDevIcons enableBarBar enableTabby;
})
./plugins/lsp
./plugins/formatter

View file

@ -19,9 +19,27 @@
"root": {
"inputs": {
"nixpkgs": "nixpkgs",
"tabby-nvim": "tabby-nvim",
"utils": "utils"
}
},
"tabby-nvim": {
"flake": false,
"locked": {
"lastModified": 1663040953,
"narHash": "sha256-QmqRKFuukm4Vn531TEoejxX3yx0ofzymExOp9c9ybDg=",
"owner": "nanozuki",
"repo": "tabby.nvim",
"rev": "916c9e56d043906a441cd9f905e2ca1f5c4dddb0",
"type": "github"
},
"original": {
"owner": "nanozuki",
"repo": "tabby.nvim",
"rev": "916c9e56d043906a441cd9f905e2ca1f5c4dddb0",
"type": "github"
}
},
"utils": {
"locked": {
"lastModified": 1659877975,

View file

@ -2,12 +2,30 @@
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
utils.url = "github:numtide/flake-utils";
tabby-nvim = {
url = "github:nanozuki/tabby.nvim?rev=916c9e56d043906a441cd9f905e2ca1f5c4dddb0";
flake = false;
};
};
outputs = { self, nixpkgs, utils, ... }:
outputs = inputs @ { self, nixpkgs, utils, ... }:
utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
pkgs = import nixpkgs {
inherit system;
overlays = [
(f: p: {
vimPlugins = p.vimPlugins // {
tabby-nvim = p.vimUtils.buildVimPluginFrom2Nix {
name = "tabby-nvim";
src = inputs.tabby-nvim;
};
};
})
];
};
neovim = pkgs.callPackage ./. { };
in
@ -21,7 +39,10 @@
devShells.default = pkgs.mkShell {
packages = [
neovim
(neovim.override {
enableDevIcons = true;
enableTabby = true;
})
pkgs.stylua # lua formatter
];
};

View file

@ -1,26 +1,31 @@
{ enableBarBar ? false
, enableDevIcons ? false
{ enableDevIcons ? false
, enableBarBar ? false
, enableTabby ? false
}:
{ lib
, catppuccin-nvim
, lualine-nvim
, lualine-lsp-progress
, barbar-nvim
, nvim-web-devicons
, barbar-nvim
, tabby-nvim
, ...
}:
let
lualinePlugins = [ lualine-nvim lualine-lsp-progress ];
in
{
luaConfig = (builtins.readFile ./catppuccin-nvim.lua)
+ (builtins.readFile ./lualine.lua)
+ (lib.optional enableBarBar (builtins.readFile ./barbar.lua));
+ (lib.optional enableBarBar (builtins.readFile ./barbar.lua))
+ (lib.optional enableTabby (builtins.readFile ./tabby-nvim.lua));
plugins = [ catppuccin-nvim ]
++ lualinePlugins
++ (lib.optional enableDevIcons [ nvim-web-devicons ])
++ (lib.optional enableBarBar [ barbar-nvim ]);
++ (lib.optional enableBarBar [ barbar-nvim ])
++ (lib.optional enableTabby [ tabby-nvim ]);
}

View file

@ -0,0 +1,5 @@
-- always display tabline
vim.o.showtabline = 2
-- See: https://github.com/nanozuki/tabby.nvim
require("tabby.tabline").use_preset("tab_only")