Skip to content

Commit

Permalink
plugins/telescope: remove redundant keymapsSilent option
Browse files Browse the repository at this point in the history
  • Loading branch information
MattSturgeon committed May 28, 2024
1 parent bc0db27 commit 56d39f5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
25 changes: 14 additions & 11 deletions plugins/telescope/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,19 @@ helpers.neovim-plugin.mkNeovimPlugin config {
deprecateExtraOptions = true;
optionsRenamedToSettings = [ "defaults" ];

imports = [ ./extensions ];
imports = [
./extensions

# TODO introduced 2024-05-24: remove 2024-08-24
(mkRemovedOptionModule
[
"plugins"
"telescope"
"keymapsSilent"
]
"This option no longer has any effect now that the `plugin.telescope.keymaps` implementation uses `<cmd>`."
)
];

extraOptions = {
keymaps = mkOption {
Expand All @@ -46,12 +58,6 @@ helpers.neovim-plugin.mkNeovimPlugin config {
};
};

keymapsSilent = mkOption {
type = types.bool;
description = "Whether telescope keymaps should be silent";
default = false;
};

highlightTheme = mkOption {
type = types.nullOr types.str;
description = "The colorscheme to use for syntax highlighting";
Expand Down Expand Up @@ -91,10 +97,7 @@ helpers.neovim-plugin.mkNeovimPlugin config {
mode = mapping.mode or "n";
inherit key;
action = "<cmd>Telescope ${actionStr}<cr>";

options = {
silent = cfg.keymapsSilent;
} // (mapping.options or { });
options = mapping.options or { };
}
) cfg.keymaps;

Expand Down
1 change: 0 additions & 1 deletion tests/test-sources/plugins/telescope/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
options.desc = "Telescope Git Files";
};
};
keymapsSilent = true;
highlightTheme = "gruvbox";
};
};
Expand Down

0 comments on commit 56d39f5

Please sign in to comment.