mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-12 18:24:35 +02:00
plugins/telescope/zoxide: init
This commit is contained in:
parent
5908b5a737
commit
380435c555
5 changed files with 112 additions and 0 deletions
88
tests/test-sources/plugins/by-name/telescope/zoxide.nix
Normal file
88
tests/test-sources/plugins/by-name/telescope/zoxide.nix
Normal file
|
@ -0,0 +1,88 @@
|
|||
{
|
||||
empty = {
|
||||
plugins = {
|
||||
telescope = {
|
||||
enable = true;
|
||||
extensions.zoxide.enable = true;
|
||||
};
|
||||
web-devicons.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
defaults = {
|
||||
plugins = {
|
||||
web-devicons.enable = true;
|
||||
telescope = {
|
||||
enable = true;
|
||||
|
||||
extensions.zoxide = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
prompt_title = "[ Zoxide List ]";
|
||||
list_command = "zoxide query -ls";
|
||||
mappings = {
|
||||
default = {
|
||||
action.__raw = ''
|
||||
function(selection)
|
||||
vim.cmd.cd(selection.path)
|
||||
end
|
||||
'';
|
||||
after_action.__raw = ''
|
||||
function(selection)
|
||||
vim.notify("Directory changed to " .. selection.path)
|
||||
end
|
||||
'';
|
||||
};
|
||||
"<C-s>".action.__raw =
|
||||
"require('telescope._extensions.zoxide.utils').create_basic_command('split')";
|
||||
"<C-v>".action.__raw =
|
||||
"require('telescope._extensions.zoxide.utils').create_basic_command('vsplit')";
|
||||
"<C-e>".action.__raw = "require('telescope._extensions.zoxide.utils').create_basic_command('edit')";
|
||||
"<C-f>" = {
|
||||
keepinsert = true;
|
||||
action.__raw = ''
|
||||
function(selection)
|
||||
builtin.find_files({ cwd = selection.path })
|
||||
end
|
||||
'';
|
||||
};
|
||||
"<C-t>".action.__raw = ''
|
||||
function(selection)
|
||||
vim.cmd.tcd(selection.path)
|
||||
end
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
example = {
|
||||
plugins = {
|
||||
web-devicons.enable = true;
|
||||
telescope = {
|
||||
enable = true;
|
||||
|
||||
extensions.zoxide = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
prompt_title = "Zoxide Folder List";
|
||||
mappings = {
|
||||
"<C-b>" = {
|
||||
keepinsert = true;
|
||||
action.__raw = ''
|
||||
function(selection)
|
||||
file_browser.file_browser({ cwd = selection.path })
|
||||
end
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue