nixos-combined-flake/modules/nixvim/plugins/telescope.nix

67 lines
1.6 KiB
Nix

{
plugins.telescope = {
enable = true;
keymaps = {
"<leader>fg" = "live_grep";
"<leader>fb" = "buffers";
"<leader>fo" = "oldfiles";
"<leader>ff" = {
action = "git_files";
options = {
desc = "Telescope Git Files";
};
};
};
extensions = {
fzf-native.enable = true;
ui-select.enable = true;
};
settings = {
defaults = {
prompt_prefix = " 󰍉 ";
selection_caret = " ";
entry_prefix = " ";
initial_mode = "insert";
selection_strategy = "reset";
sorting_strategy = "ascending";
layout_strategy = "horizontal";
layout_config = {
horizontal = {
prompt_position = "top";
preview_width = 0.55;
results_width = 0.8;
};
vertical = {
mirror = true;
};
width = 0.87;
height = 0.80;
preview_cutoff = 120;
};
file_ignore_patterns = ["node_modules" "vendor"];
path_display = ["truncate"];
winblend = 3;
border = {};
borderchars = [" " " " " " " " " " " " " " " "];
color_devicons = true;
pickers = {
find_files = {
find_command = ["rg" "--files" "--hidden" "--glob" "!**/.git/*"];
};
};
mappings = {
i = {
"<esc>" = {
__raw = ''
function(...)
return require("telescope.actions").close(...)
end
'';
};
};
};
};
};
};
}