mirror of
https://github.com/nix-community/nixvim.git
synced 2025-08-01 08:34:41 +02:00
plugins/telescope: refactor mkExtension
Allow importing `mkExtension` without needing to supply any dependencies. All dependencies can be accessed via module args anyway.
This commit is contained in:
parent
c674f10d18
commit
929bb0cd1c
11 changed files with 115 additions and 136 deletions
|
@ -1,15 +1,11 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{ lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
inherit (lib.nixvim) defaultNullOpts mkNullOrOption;
|
||||
telescopeHelpers = import ./_helpers.nix { inherit lib config pkgs; };
|
||||
inherit (import ./_helpers.nix lib) mkMappingsOption;
|
||||
mkExtension = import ./_mk-extension.nix;
|
||||
in
|
||||
telescopeHelpers.mkExtension {
|
||||
mkExtension {
|
||||
name = "undo";
|
||||
package = "telescope-undo-nvim";
|
||||
|
||||
|
@ -84,7 +80,7 @@ telescopeHelpers.mkExtension {
|
|||
Can be set to a [Lua date format string](https://www.lua.org/pil/22.1.html).
|
||||
'';
|
||||
|
||||
mappings = telescopeHelpers.mkMappingsOption {
|
||||
mappings = mkMappingsOption {
|
||||
insertDefaults = ''
|
||||
{
|
||||
"<cr>" = "require('telescope-undo.actions').yank_additions";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue