{ ... }: { programs.nixvim = { keymaps = [ ## Lists files in your current working directory, respects .gitignore { mode = [ "n" ]; key = "ff"; action = "Telescope find_files"; options = { noremap = true; }; } ## Finds files by filename { mode = [ "n" ]; key = ""; action = "Telescope find_files"; # action = "FzfLua files"; options = { noremap = true; }; } # Search for a string in your current working directory and get results live as you type, respects .gitignore. (Requires ripgrep) { mode = [ "n" ]; key = "fg"; action = "Telescope live_grep"; # action = "FzfLua live_grep"; options = { noremap = true; }; } # Search file contents { mode = [ "n" ]; key = ""; action = "Telescope live_grep"; # action = "FzfLua live_grep"; options = { noremap = true; }; } # Lists open buffers in current neovim instance { mode = [ "n" ]; key = "db"; action = "Telescope buffers"; # action = "FzfLua buffers"; options = { noremap = true; }; } # Lists available help tags and opens a new window with the relevant help info on { mode = [ "n" ]; key = "fh"; action = "Telescope help_tags"; # action = "FzfLua helptags"; options = { noremap = true; }; } # Lists manpage entries, opens them in a help window on { mode = [ "n" ]; key = "fm"; action = "Telescope man_pages"; # action = "FzfLua manpages"; options = { noremap = true; }; } # Lists previously open files { mode = [ "n" ]; key = "fp"; action = "Telescope oldfiles"; # action = "FzfLua oldfiles"; options = { noremap = true; }; } # Lists previously open files, Maps to ctrl-/ { mode = [ "n" ]; key = ""; action = "Telescope oldfiles"; # action = "FzfLua oldfiles"; options = { noremap = true; }; } ## Binding currently used by nvim-tree ## Lists spelling suggestions for the current word under the cursor, replaces word with selected suggestion on # { # mode = [ "n" ]; # key = "fs"; # action = "Telescope spell_suggest"; # # action = "FzfLua spell_suggest"; # options = { noremap = true; }; # } # Lists LSP references for iword under the cursor { mode = [ "n" ]; key = "fr"; action = "Telescope lsp_references"; # action = "FzfLua lsp_references"; options = { noremap = true; }; } # Lists LSP incoming calls for word under the cursor { mode = [ "n" ]; key = "fi"; action = "Telescope lsp_incoming_calls"; # action = "FzfLua lsp_incoming_calls"; options = { noremap = true; }; } # Lists LSP outgoing calls for word under the cursor { mode = [ "n" ]; key = "fo"; action = "Telescope lsp_outgoing_calls"; # action = "FzfLua lsp_outgoing_calls"; options = { noremap = true; }; } # Dynamically Lists LSP for all workspace symbols { mode = [ "n" ]; key = "fw"; action = "Telescope lsp_dynamic_workspace_symbols"; # action = "FzfLua lsp_workspace_symbols"; options = { noremap = true; }; } # Goto the definition of the word under the cursor, if there's only one, otherwise show all options in Telescope { mode = [ "n" ]; key = "fd"; action = "Telescope lsp_definitions"; options = { noremap = true; }; } # Got to previous error { mode = [ "n" ]; key = "[d"; action = "lua vim.diagnostic.goto_prev()"; options = { noremap = true; silent = true; }; } { mode = [ "n" ]; key = ",k"; action = "lua vim.diagnostic.goto_prev()"; options = { noremap = true; silent = true; }; } # Got to next error { mode = [ "n" ]; key = "]d"; action = "lua vim.diagnostic.goto_next()"; options = { noremap = true; silent = true; }; } { mode = [ "n" ]; key = ",j"; action = "lua vim.diagnostic.goto_next()"; options = { noremap = true; silent = true; }; } ## Other Telescope options: ## git_files search only files in git, respects .gitignore ## oldfiles previously opened files ## command_history ## search_history ## man_pages ## resume lists the results including multi-selections of the previous ## picker ]; plugins.telescope = { enable = true; extensions.ui-select.enable = true; settings = { defaults = { mappings = { i = { # One instead of two esc taps to exit telescope "" = { __raw = "require('telescope.actions').close"; }; # Ctrl-space is used by Tmux, so remap to Ctrl-e "" = { __raw = "require('telescope.actions').to_fuzzy_refine"; }; "" = { __raw = "require('trouble.sources.telescope').open"; }; }; n = { "" = { __raw = "require('trouble.sources.telescope').open"; }; }; }; }; }; }; }; }