Skip to content

Commit

Permalink
Merge pull request #565 from LilleAila/add-fzf-lua
Browse files Browse the repository at this point in the history
utility/fzf-lua: init
  • Loading branch information
NotAShelf authored Jan 19, 2025
2 parents e51dce0 + f338fd3 commit 91cb482
Show file tree
Hide file tree
Showing 7 changed files with 84 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/release-notes/rl-0.8.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
- Add `vim.snippets.luasnip.setupOpts`, which was previously missing.
- Add `"prettierd"` as a formatter option in
`vim.languages.markdown.format.type`.
- Add [fzf-lua](https://github.com/ibhagwan/fzf-lua) in `vim.fzf-lua`

[kaktu5](https://github.com/kaktu5):

Expand Down
17 changes: 17 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
1 change: 1 addition & 0 deletions modules/plugins/utility/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@
./wakatime
./surround
./preview
./fzf-lua
];
}
16 changes: 16 additions & 0 deletions modules/plugins/utility/fzf-lua/config.nix
Original file line number Diff line number Diff line change
@@ -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";
setupOpts = cfg.setupOpts // {"@1" = cfg.profile;};
};
}
6 changes: 6 additions & 0 deletions modules/plugins/utility/fzf-lua/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
imports = [
./fzf-lua.nix
./config.nix
];
}
37 changes: 37 additions & 0 deletions modules/plugins/utility/fzf-lua/fzf-lua.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
config,
lib,
...
}: let
inherit (lib.types) nullOr enum;
inherit (lib.options) mkEnableOption mkOption;
inherit (lib.nvim.types) mkPluginSetupOption borderType;
in {
options.vim.fzf-lua = {
enable = mkEnableOption "fzf-lua";
setupOpts = mkPluginSetupOption "fzf-lua" {
winopts.border = mkOption {
type = borderType;
default = config.vim.ui.borders.globalStyle;
description = "Border type for the fzf-lua picker window";
};
};
profile = mkOption {
type = enum [
"default"
"default-title"
"fzf-native"
"fzf-tmux"
"fzf-vim"
"max-perf"
"telescope"
"skim"
"borderless"
"borderless-full"
"border-fused"
];
default = "default";
description = "The configuration profile to use";
};
};
}

0 comments on commit 91cb482

Please sign in to comment.