Skip to content

Commit

Permalink
fastaction: move to vim.ui, remove mappings, enable register_ui_selec…
Browse files Browse the repository at this point in the history
…t by default
  • Loading branch information
diniamo committed Sep 19, 2024
1 parent 7e8a53b commit 526ceb2
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 65 deletions.
1 change: 1 addition & 0 deletions configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ isMaximal: {
go = ["90" "130"];
};
};
fastaction.enable = true;
};

assistant = {
Expand Down
10 changes: 0 additions & 10 deletions modules/plugins/lsp/code-actions/default.nix

This file was deleted.

36 changes: 0 additions & 36 deletions modules/plugins/lsp/code-actions/fastaction-nvim/config.nix

This file was deleted.

This file was deleted.

3 changes: 0 additions & 3 deletions modules/plugins/lsp/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,5 @@
./lspkind
./lsplines
./nvim-docs-view

# Code Actions
./code-actions
];
}
1 change: 1 addition & 0 deletions modules/plugins/ui/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
./illuminate
./breadcrumbs
./borders
./fastaction
];
}
20 changes: 20 additions & 0 deletions modules/plugins/ui/fastaction/config.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
config,
lib,
...
}: let
inherit (lib.modules) mkIf mkDefault;
inherit (lib.nvim.dag) entryAnywhere;
inherit (lib.nvim.lua) toLuaObject;

cfg = config.vim.ui.fastaction;
in {
config = mkIf cfg.enable {
vim = {
ui.fastaction.setupOpts.register_ui_select = mkDefault true;

startPlugins = ["fastaction-nvim"];
pluginRC.fastaction-nvim = entryAnywhere "require('fastaction').setup(${toLuaObject cfg.setupOpts})";
};
};
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
imports = [
./config.nix
./fastaction-nvim.nix
./config.nix
];
}
9 changes: 9 additions & 0 deletions modules/plugins/ui/fastaction/fastaction-nvim.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{lib, ...}: let
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkPluginSetupOption;
in {
options.vim.ui.fastaction = {
enable = mkEnableOption "overriding vim.ui.select with fastaction.nvim";
setupOpts = mkPluginSetupOption "fastaction" {};
};
}

0 comments on commit 526ceb2

Please sign in to comment.