Compare commits

...

9 commits

Author SHA1 Message Date
raf
9e38d00f1f
Merge branch 'main' into add-mini-nvim 2025-01-19 12:39:20 +03:00
LilleAila
e331f009d5
mini/hues: more descriptive color options 2025-01-19 10:19:34 +01:00
LilleAila
ae81ab2c5f
mini/notify: set vim.notify, assert nvim-notify 2025-01-19 10:16:25 +01:00
raf
91cb482873
Merge pull request #565 from LilleAila/add-fzf-lua
utility/fzf-lua: init
2025-01-19 11:58:01 +03:00
LilleAila
f338fd3411
utility/fzf-lua: fix typo in profile description 2025-01-18 23:33:46 +01:00
LilleAila
ba55a1b54a
utility/fzf-lua: add profile option, fix name 2025-01-18 23:33:45 +01:00
LilleAila
775963dd9d
utility/fzf-lua: add border option description 2025-01-18 23:33:45 +01:00
LilleAila
ce7017cf5b
utility/fzf-lua: add changelog 2025-01-18 23:33:45 +01:00
LilleAila
f279e3a585
utility/fzf-lua: init 2025-01-18 23:33:37 +01:00
10 changed files with 121 additions and 17 deletions

View file

@ -101,6 +101,7 @@
- `mini.test`
- `mini.trailspace`
- `mini.visits`
- Add [fzf-lua](https://github.com/ibhagwan/fzf-lua) in `vim.fzf-lua`
[kaktu5](https://github.com/kaktu5):

17
flake.lock generated
View file

@ -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": {
@ -2767,6 +2783,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",

View file

@ -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";

View file

@ -12,21 +12,13 @@ in {
enable = mkEnableOption "mini.hues";
setupOpts = mkPluginSetupOption "mini.hues" {
background = mkOption {
description = "The background color to use";
description = "The hex color for the background color of the color scheme, prefixed with #";
type = hexColor;
apply = v:
if hasPrefix "#" v
then v
else "#${v}";
};
foreground = mkOption {
description = "The foreground color to use";
description = "The hex color for the foreground color of the color scheme, prefixed with #";
type = hexColor;
apply = v:
if hasPrefix "#" v
then v
else "#${v}";
};
};
};

View file

@ -3,17 +3,18 @@
lib,
...
}: let
inherit (lib.modules) mkIf;
inherit (lib.modules) mkIf mkAssert;
inherit (lib.nvim.dag) entryAnywhere;
inherit (lib.nvim.lua) toLuaObject;
cfg = config.vim.mini.notify;
in {
vim = mkIf cfg.enable {
vim = mkIf cfg.enable (mkAssert (!config.vim.notify.nvim-notify.enable) "Mini.notify is incompatible with nvim-notify!" {
startPlugins = ["mini-notify"];
pluginRC.mini-notify = entryAnywhere ''
require("mini.notify").setup(${toLuaObject cfg.setupOpts})
vim.notify = MiniNotify.make_notify(${toLuaObject cfg.notifyOpts})
'';
};
});
}

View file

@ -3,11 +3,39 @@
lib,
...
}: let
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkPluginSetupOption;
inherit (lib.options) mkEnableOption mkOption;
inherit (lib.types) int str;
inherit (lib.nvim.types) mkPluginSetupOption borderType;
mkNotifyOpt = name: duration: hl_group: {
duration = mkOption {
type = int;
default = duration;
description = "The duration of the ${name} notification";
};
hl_group = mkOption {
type = str;
default = hl_group;
description = "The highlight group of the ${name} notification";
};
};
in {
options.vim.mini.notify = {
enable = mkEnableOption "mini.notify";
setupOpts = mkPluginSetupOption "mini.notify" {};
setupOpts = mkPluginSetupOption "mini.notify" {
window.config.border = mkOption {
type = borderType;
default = config.vim.ui.borders.globalStyle;
description = "The border type for the mini.notify-notifications";
};
};
notifyOpts = mkPluginSetupOption "mini.notify notifications" {
ERROR = mkNotifyOpt "error" 5000 "DiagnosticError";
WARN = mkNotifyOpt "warn" 5000 "DiagnosticWarn";
INFO = mkNotifyOpt "info" 5000 "DiagnosticInfo";
DEBUG = mkNotifyOpt "debug" 0 "DiagnosticHint";
TRACE = mkNotifyOpt "trace" 0 "DiagnosticOk";
OFF = mkNotifyOpt "off" 0 "MiniNotifyNormal";
};
};
}

View file

@ -14,5 +14,6 @@
./wakatime
./surround
./preview
./fzf-lua
];
}

View file

@ -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;};
};
}

View file

@ -0,0 +1,6 @@
{
imports = [
./fzf-lua.nix
./config.nix
];
}

View file

@ -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";
};
};
}