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 24b4902
Show file tree
Hide file tree
Showing 10 changed files with 35 additions and 74 deletions.
7 changes: 1 addition & 6 deletions configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@ isMaximal: {
lspSignature.enable = true;
lsplines.enable = isMaximal;
nvim-docs-view.enable = isMaximal;

# Code Actions
code-actions = {
enable = true;
fastaction-nvim.enable = true;
};
};

debugger = {
Expand Down Expand Up @@ -209,6 +203,7 @@ isMaximal: {
go = ["90" "130"];
};
};
fastaction.enable = true;
};

assistant = {
Expand Down
6 changes: 3 additions & 3 deletions modules/extra/deprecations.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ in {

# 2024-07-20
(mkRemovedOptionModule ["vim" "lsp" "nvimCodeActionMenu"] ''
nvimCodeActionMenu has been deprecated and archived upstream. As of 0.7, code-actions will be
available under `vim.lsp.code-actions.enable` and `vim.lsp.code.actions.<plugin>.enable`.
Please take a look at the nvf manual for more details.
nvimCodeActionMenu has been deprecated and archived upstream. As of 0.7, fastaction will be
available under `vim.ui.fastaction` as a replacement. Please take a look at the nvf manual
for more details.
'')
];
}
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 24b4902

Please sign in to comment.