mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-11-14 05:55:59 +01:00
729276c4c5
new file: modules/utility/binds/cheatsheet/cheatsheet.nix new file: modules/utility/binds/cheatsheet/config.nix modified: modules/utility/binds/cheatsheet/default.nix modified: modules/utility/binds/default.nix new file: modules/utility/binds/which-key/config.nix modified: modules/utility/binds/which-key/default.nix new file: modules/utility/binds/which-key/which-key.nix renamed: modules/utility/colorizer.nix -> modules/utility/colorizer/colorizer.nix new file: modules/utility/colorizer/config.nix new file: modules/utility/colorizer/default.nix modified: modules/utility/default.nix modified: modules/utility/gestures/default.nix renamed: modules/utility/gestures/gesture-nvim.nix -> modules/utility/gestures/gesture-nvim/config.nix new file: modules/utility/gestures/gesture-nvim/default.nix new file: modules/utility/gestures/gesture-nvim/gesture-nvim.nix renamed: modules/utility/icon-picker.nix -> modules/utility/icon-picker/config.nix new file: modules/utility/icon-picker/default.nix new file: modules/utility/icon-picker/icon-picker.nix new file: modules/utility/telescope/config.nix modified: modules/utility/telescope/default.nix new file: modules/utility/telescope/telescope.nix renamed: modules/utility/venn.nix -> modules/utility/venn/config.nix new file: modules/utility/venn/default.nix new file: modules/utility/venn/venn.nix
86 lines
2.3 KiB
Nix
86 lines
2.3 KiB
Nix
{
|
|
pkgs,
|
|
config,
|
|
lib,
|
|
...
|
|
}:
|
|
with lib;
|
|
with builtins; let
|
|
cfg = config.vim.telescope;
|
|
in {
|
|
config = mkIf (cfg.enable) {
|
|
vim.startPlugins = [
|
|
"telescope"
|
|
];
|
|
|
|
vim.nnoremap =
|
|
{
|
|
"<leader>ff" = "<cmd> Telescope find_files<CR>";
|
|
"<leader>fg" = "<cmd> Telescope live_grep<CR>";
|
|
"<leader>fb" = "<cmd> Telescope buffers<CR>";
|
|
"<leader>fh" = "<cmd> Telescope help_tags<CR>";
|
|
"<leader>ft" = "<cmd> Telescope<CR>";
|
|
|
|
"<leader>fvcw" = "<cmd> Telescope git_commits<CR>";
|
|
"<leader>fvcb" = "<cmd> Telescope git_bcommits<CR>";
|
|
"<leader>fvb" = "<cmd> Telescope git_branches<CR>";
|
|
"<leader>fvs" = "<cmd> Telescope git_status<CR>";
|
|
"<leader>fvx" = "<cmd> Telescope git_stash<CR>";
|
|
}
|
|
// (
|
|
if config.vim.lsp.enable
|
|
then {
|
|
"<leader>flsb" = "<cmd> Telescope lsp_document_symbols<CR>";
|
|
"<leader>flsw" = "<cmd> Telescope lsp_workspace_symbols<CR>";
|
|
|
|
"<leader>flr" = "<cmd> Telescope lsp_references<CR>";
|
|
"<leader>fli" = "<cmd> Telescope lsp_implementations<CR>";
|
|
"<leader>flD" = "<cmd> Telescope lsp_definitions<CR>";
|
|
"<leader>flt" = "<cmd> Telescope lsp_type_definitions<CR>";
|
|
"<leader>fld" = "<cmd> Telescope diagnostics<CR>";
|
|
}
|
|
else {}
|
|
)
|
|
// (
|
|
if config.vim.treesitter.enable
|
|
then {
|
|
"<leader>fs" = "<cmd> Telescope treesitter<CR>";
|
|
}
|
|
else {}
|
|
);
|
|
|
|
vim.luaConfigRC.telescope = nvim.dag.entryAnywhere ''
|
|
local telescope = require('telescope')
|
|
telescope.setup {
|
|
defaults = {
|
|
vimgrep_arguments = {
|
|
"${pkgs.ripgrep}/bin/rg",
|
|
"--color=never",
|
|
"--no-heading",
|
|
"--with-filename",
|
|
"--line-number",
|
|
"--column",
|
|
"--smart-case"
|
|
},
|
|
pickers = {
|
|
find_command = {
|
|
"${pkgs.fd}/bin/fd",
|
|
},
|
|
},
|
|
}
|
|
}
|
|
|
|
${
|
|
if config.vim.ui.noice.enable
|
|
then "telescope.load_extension('noice')"
|
|
else null
|
|
}
|
|
|
|
${
|
|
if config.vim.notify.nvim-notify.enable
|
|
then "telescope.load_extension('notify')"
|
|
else null
|
|
}
|
|
'';
|
|
};
|
|
}
|