diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index 42927baf..2835680c 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -101,7 +101,6 @@ - `mini.test` - `mini.trailspace` - `mini.visits` -- Add [fzf-lua](https://github.com/ibhagwan/fzf-lua) in `vim.fzf-lua` [kaktu5](https://github.com/kaktu5): diff --git a/flake.lock b/flake.lock index 7b7f0bab..40690c8b 100644 --- a/flake.lock +++ b/flake.lock @@ -599,22 +599,6 @@ "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": { @@ -2783,7 +2767,6 @@ "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 05b6fc4b..8c0521a2 100644 --- a/flake.nix +++ b/flake.nix @@ -236,17 +236,12 @@ flake = false; }; - # Pickers + # Telescope 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/mini/hues/hues.nix b/modules/plugins/mini/hues/hues.nix index 13de5116..f848923a 100644 --- a/modules/plugins/mini/hues/hues.nix +++ b/modules/plugins/mini/hues/hues.nix @@ -12,13 +12,21 @@ in { enable = mkEnableOption "mini.hues"; setupOpts = mkPluginSetupOption "mini.hues" { background = mkOption { - description = "The hex color for the background color of the color scheme, prefixed with #"; + description = "The background color to use"; type = hexColor; + apply = v: + if hasPrefix "#" v + then v + else "#${v}"; }; foreground = mkOption { - description = "The hex color for the foreground color of the color scheme, prefixed with #"; + description = "The foreground color to use"; type = hexColor; + apply = v: + if hasPrefix "#" v + then v + else "#${v}"; }; }; }; diff --git a/modules/plugins/mini/notify/config.nix b/modules/plugins/mini/notify/config.nix index 6872092c..2a5ff46e 100644 --- a/modules/plugins/mini/notify/config.nix +++ b/modules/plugins/mini/notify/config.nix @@ -3,18 +3,17 @@ lib, ... }: let - inherit (lib.modules) mkIf mkAssert; + inherit (lib.modules) mkIf; inherit (lib.nvim.dag) entryAnywhere; inherit (lib.nvim.lua) toLuaObject; cfg = config.vim.mini.notify; in { - vim = mkIf cfg.enable (mkAssert (!config.vim.notify.nvim-notify.enable) "Mini.notify is incompatible with nvim-notify!" { + vim = mkIf cfg.enable { startPlugins = ["mini-notify"]; pluginRC.mini-notify = entryAnywhere '' require("mini.notify").setup(${toLuaObject cfg.setupOpts}) - vim.notify = MiniNotify.make_notify(${toLuaObject cfg.notifyOpts}) ''; - }); + }; } diff --git a/modules/plugins/mini/notify/notify.nix b/modules/plugins/mini/notify/notify.nix index 628be47a..e98f6e71 100644 --- a/modules/plugins/mini/notify/notify.nix +++ b/modules/plugins/mini/notify/notify.nix @@ -3,39 +3,11 @@ lib, ... }: let - 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"; - }; - }; + inherit (lib.options) mkEnableOption; + inherit (lib.nvim.types) mkPluginSetupOption; in { options.vim.mini.notify = { enable = mkEnableOption "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"; - }; + setupOpts = mkPluginSetupOption "mini.notify" {}; }; } diff --git a/modules/plugins/utility/default.nix b/modules/plugins/utility/default.nix index 8b25ea8f..686295e2 100644 --- a/modules/plugins/utility/default.nix +++ b/modules/plugins/utility/default.nix @@ -14,6 +14,5 @@ ./wakatime ./surround ./preview - ./fzf-lua ]; } diff --git a/modules/plugins/utility/fzf-lua/config.nix b/modules/plugins/utility/fzf-lua/config.nix deleted file mode 100644 index 85425fc7..00000000 --- a/modules/plugins/utility/fzf-lua/config.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ - 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;}; - }; -} diff --git a/modules/plugins/utility/fzf-lua/default.nix b/modules/plugins/utility/fzf-lua/default.nix deleted file mode 100644 index e5147e44..00000000 --- a/modules/plugins/utility/fzf-lua/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - 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 deleted file mode 100644 index c700add7..00000000 --- a/modules/plugins/utility/fzf-lua/fzf-lua.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ - 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"; - }; - }; -}