Update telescope

This commit is contained in:
♥ Minnie ♥ 2024-08-06 13:11:01 +08:00
parent ec6dbf60e8
commit 8ca815550f
Signed by: jasmine
GPG key ID: 8563E358D4E8040E
3 changed files with 80 additions and 2 deletions

View file

@ -0,0 +1,18 @@
{ pkgs, ... }:
{
extraPlugins = [(pkgs.vimUtils.buildVimPlugin {
name = "neoclip";
src = pkgs.fetchFromGitHub {
owner = "AckslD";
repo = "nvim-neoclip.lua";
rev = "709c97f";
hash = "sha256-8ZPmxVM4dzjJxAYUHRMCiAQBxZEGHtsgSCNlCZBRBWo=";
};
})];
extraConfigLua = "require('neoclip').setup({
default_register = {'\"', '+'}
})";
}

View file

@ -0,0 +1,14 @@
{ pkgs, ... }:
{
extraPlugins = [(pkgs.vimUtils.buildVimPlugin {
name = "software-licenses";
src = pkgs.fetchFromGitHub {
owner = "chip";
repo = "telescope-software-licenses.nvim";
rev = "fb5fc33";
hash = "sha256-luyCjkZSm1F6qoRpP5hHRAx4632u6JFuX2s7m2s8y60=";
};
})];
}

View file

@ -1,17 +1,63 @@
{ ... }: { ... }:
{ {
imports = [
./neoclip.nix # Persistent clipboard.
./software-licenses.nix # View common software licenses.
];
plugins.telescope = { plugins.telescope = {
enable = true; enable = true;
# Install some telescope extensions.
extensions = {
# Enable native fuzzy finder.
fzf-native = {
enable = true;
};
};
# Configure our telescope keymaps.
keymaps = { keymaps = {
"<leader>ff" = { "<leader>ff" = {
action = "find_files"; action = "find_files";
options.desc = "Find Files"; options = {
desc = "Find project files";
};
}; };
"<leader>fb" = { "<leader>fb" = {
action = "buffers"; action = "buffers";
options.desc = "Buffers"; options = {
desc = "Find open buffers";
};
};
"<leader>/" = {
action = "live_grep";
options = {
desc = "Grep (root dir)";
};
};
"<leader>:" = {
action = "command_history";
options = {
desc = "Command History";
};
};
"<leader>p" = {
action = "neoclip";
options.desc = "Persistent Clipboard";
};
"<leader>sc" = {
action = "commands";
options = {
desc = "Search Commands";
};
};
"<leader>sl" = {
action = "software-licenses find";
options = {
desc = "Search Software Licenses";
};
}; };
}; };
}; };