diff --git a/flake.lock b/flake.lock index 918b0ce1..e28d03b5 100644 --- a/flake.lock +++ b/flake.lock @@ -599,6 +599,22 @@ "type": "github" } }, + "plugin-fzf-lua": { + "flake": false, + "locked": { + "lastModified": 1737131132, + "narHash": "sha256-0IdADUsIr+SZ0ort92jPPfGIH1EdcwELYz+TCmDCPPI=", + "owner": "ibhagwan", + "repo": "fzf-lua", + "rev": "fbe21aeb147b3dc8b188b5753a8e288ecedcee5e", + "type": "github" + }, + "original": { + "owner": "ibhagwan", + "repo": "fzf-lua", + "type": "github" + } + }, "plugin-gesture-nvim": { "flake": false, "locked": { @@ -2127,6 +2143,7 @@ "plugin-fidget-nvim": "plugin-fidget-nvim", "plugin-flutter-tools": "plugin-flutter-tools", "plugin-friendly-snippets": "plugin-friendly-snippets", + "plugin-fzf-lua": "plugin-fzf-lua", "plugin-gesture-nvim": "plugin-gesture-nvim", "plugin-gitsigns-nvim": "plugin-gitsigns-nvim", "plugin-glow-nvim": "plugin-glow-nvim", diff --git a/flake.nix b/flake.nix index 02ceb667..19443813 100644 --- a/flake.nix +++ b/flake.nix @@ -236,12 +236,17 @@ flake = false; }; - # Telescope + # Pickers plugin-telescope = { url = "github:nvim-telescope/telescope.nvim"; flake = false; }; + plugin-fzf-lua = { + url = "github:ibhagwan/fzf-lua"; + flake = false; + }; + # Runners plugin-run-nvim = { url = "github:diniamo/run.nvim"; diff --git a/modules/plugins/utility/default.nix b/modules/plugins/utility/default.nix index 686295e2..8b25ea8f 100644 --- a/modules/plugins/utility/default.nix +++ b/modules/plugins/utility/default.nix @@ -14,5 +14,6 @@ ./wakatime ./surround ./preview + ./fzf-lua ]; } diff --git a/modules/plugins/utility/fzf-lua/config.nix b/modules/plugins/utility/fzf-lua/config.nix new file mode 100644 index 00000000..558f3cd1 --- /dev/null +++ b/modules/plugins/utility/fzf-lua/config.nix @@ -0,0 +1,16 @@ +{ + config, + lib, + ... +}: let + inherit (lib.modules) mkIf; + + cfg = config.vim.fzf-lua; +in { + vim.lazy.plugins."fzf-lua" = mkIf cfg.enable { + package = "fzf-lua"; + cmd = ["FzfLua"]; + setupModule = "fzf-lua"; + inherit (cfg) setupOpts; + }; +} diff --git a/modules/plugins/utility/fzf-lua/default.nix b/modules/plugins/utility/fzf-lua/default.nix new file mode 100644 index 00000000..e5147e44 --- /dev/null +++ b/modules/plugins/utility/fzf-lua/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./fzf-lua.nix + ./config.nix + ]; +} diff --git a/modules/plugins/utility/fzf-lua/fzf-lua.nix b/modules/plugins/utility/fzf-lua/fzf-lua.nix new file mode 100644 index 00000000..099911be --- /dev/null +++ b/modules/plugins/utility/fzf-lua/fzf-lua.nix @@ -0,0 +1,18 @@ +{ + config, + lib, + ... +}: let + inherit (lib.options) mkEnableOption mkOption; + inherit (lib.nvim.types) mkPluginSetupOption borderType; +in { + options.vim.fzf-lua = { + enable = mkEnableOption "fzf-lua"; + setupOpts = mkPluginSetupOption "mini.ai" { + winopts.border = mkOption { + type = borderType; + default = config.vim.ui.borders.globalStyle; + }; + }; + }; +}