From 7aec23513c5d202834367e266a838f003e9370b4 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Mon, 27 Feb 2023 16:34:25 +0300 Subject: [PATCH] feat: import barbecue-nvim configs into the flake --- lib/types-plugin.nix | 2 ++ modules/modules.nix | 1 + modules/winbar/barbecue/default.nix | 29 +++++++++++++++++++++++++++++ modules/winbar/default.nix | 5 +++++ 4 files changed, 37 insertions(+) create mode 100644 modules/winbar/barbecue/default.nix create mode 100644 modules/winbar/default.nix diff --git a/lib/types-plugin.nix b/lib/types-plugin.nix index 646f4eb8..f3b84706 100644 --- a/lib/types-plugin.nix +++ b/lib/types-plugin.nix @@ -69,6 +69,8 @@ with lib; let "comment-nvim" "kommentary" "mind-nvim" + "nvim-navic" + "barbecue-nvim" ]; # You can either use the name of the plugin or a package. pluginsType = with types; listOf (nullOr (either (enum availablePlugins) package)); diff --git a/modules/modules.nix b/modules/modules.nix index da02dcf1..ad6fb5c7 100644 --- a/modules/modules.nix +++ b/modules/modules.nix @@ -30,6 +30,7 @@ ./assistant ./session ./comments + ./winbar ]; pkgsModule = {config, ...}: { diff --git a/modules/winbar/barbecue/default.nix b/modules/winbar/barbecue/default.nix new file mode 100644 index 00000000..9458a3a8 --- /dev/null +++ b/modules/winbar/barbecue/default.nix @@ -0,0 +1,29 @@ +{ + pkgs, + config, + lib, + ... +}: +with lib; +with builtins; let + cfg = config.vim.winbar.barbecue; +in { + options.vim.winbar.barbecue = { + enable = mkEnableOption "Enable barbecue.nvim"; + }; + + config = (mkIf cfg.enable) { + vim.startPlugins = + [ + "barbecue-nvim" + "nvim-navic" + ] + ++ optional (config.vim.visuals.nvimWebDevicons.enable) "nvim-web-devicons"; + + vim.luaConfigRC.barbecue-nvim = nvim.dag.entryAnywhere '' + config = function() + require("barbecue").setup() + end, + ''; + }; +} diff --git a/modules/winbar/default.nix b/modules/winbar/default.nix new file mode 100644 index 00000000..0039529a --- /dev/null +++ b/modules/winbar/default.nix @@ -0,0 +1,5 @@ +_: { + imports = [ + ./barbecue + ]; +}