mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-25 13:14:37 +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
|
||||
telescopeHelpers = import ./_helpers.nix { inherit lib config pkgs; };
|
||||
inherit (import ./_helpers.nix lib) mkMappingsOption;
|
||||
mkExtension = import ./_mk-extension.nix;
|
||||
inherit (lib.nixvim) defaultNullOpts mkNullOrStr;
|
||||
in
|
||||
telescopeHelpers.mkExtension {
|
||||
mkExtension {
|
||||
name = "file-browser";
|
||||
extensionName = "file_browser";
|
||||
package = "telescope-file-browser-nvim";
|
||||
|
@ -183,7 +179,7 @@ telescopeHelpers.mkExtension {
|
|||
Show the current relative path from cwd as the prompt prefix.
|
||||
'';
|
||||
|
||||
mappings = telescopeHelpers.mkMappingsOption {
|
||||
mappings = mkMappingsOption {
|
||||
insertDefaults = ''
|
||||
{
|
||||
"<A-c>" = "require('telescope._extensions.file_browser.actions').create";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue