mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-30 22:57:55 +00:00
users/foo-dogsquared/programs/nixvim: add fuzzy finding subset
This commit is contained in:
parent
5af855715e
commit
0557d111ea
@ -17,6 +17,7 @@ in
|
||||
imports =
|
||||
[
|
||||
./colorschemes.nix
|
||||
./fuzzy-finding.nix
|
||||
./misc.nix
|
||||
./note-taking.nix
|
||||
]
|
||||
|
@ -0,0 +1,42 @@
|
||||
{ config, lib, helpers, hmConfig, ... }:
|
||||
|
||||
let
|
||||
inherit (hmConfig.xdg) userDirs;
|
||||
telescopeExtensions = config.plugins.telescope.extensions;
|
||||
in
|
||||
{
|
||||
plugins.telescope.extensions.frecency = {
|
||||
enable = true;
|
||||
settings = {
|
||||
show_scores = true;
|
||||
show_unindexed = true;
|
||||
workspaces = {
|
||||
writings = "${userDirs.documents}/Writings";
|
||||
packages = "${userDirs.extraConfig.XDG_PROJECTS_DIR}/packages";
|
||||
software = "${userDirs.extraConfig.XDG_PROJECTS_DIR}/software";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
plugins.telescope.extensions.live-grep-args = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
plugins.telescope.keymaps = lib.mkMerge [
|
||||
(lib.mkIf telescopeExtensions.frecency.enable {
|
||||
"<leader>fp" = {
|
||||
mode = "n";
|
||||
options.desc = "List projects";
|
||||
action = helpers.mkRaw "require('telescope').extensions.project.project{}";
|
||||
};
|
||||
})
|
||||
|
||||
(lib.mkIf telescopeExtensions.live-grep-args.enable {
|
||||
"<leader>fG" = {
|
||||
mode = "n";
|
||||
options.desc = "Live grep (with args) for the whole project";
|
||||
action = helpers.mkRaw "require('telescope').extensions.live_grep_args.live_grep_args";
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
Loading…
Reference in New Issue
Block a user