diff --git a/home/common/core/nixvim/keymaps.nix b/home/common/core/nixvim/keymaps.nix index 3e92f0a..f405efa 100644 --- a/home/common/core/nixvim/keymaps.nix +++ b/home/common/core/nixvim/keymaps.nix @@ -50,35 +50,6 @@ programs.nixvim.keymaps = [ options = {noremap = true;}; } - # Telescope Plugin - { - # find files - mode = ["n"]; - key = "ff"; - action = "Telescope find_files"; - options = {noremap = true;}; - } - { - # live grep - mode = ["n"]; - key = "fg"; - action = "Telescope live_grep"; - options = {noremap = true;}; - } - { - # buffers - mode = ["n"]; - key = "fb"; - action = "Telescope buffers"; - options = {noremap = true;}; - } - { - # help tags - mode = ["n"]; - key = "fh"; - action = "Telescope help_tags"; - options = {noremap = true;}; - } # paste over selected text without yanking it { mode = ["v"]; diff --git a/home/common/core/nixvim/plugins/telescope.nix b/home/common/core/nixvim/plugins/telescope.nix index 9582b09..e309362 100644 --- a/home/common/core/nixvim/plugins/telescope.nix +++ b/home/common/core/nixvim/plugins/telescope.nix @@ -3,4 +3,48 @@ enable = true; extensions.fzy-native.enable = true; }; + keymaps = [ + { + # find files + mode = ["n"]; + key = "ff"; + action = "Telescope find_files"; + options = {noremap = true;}; + } + { + # live grep + mode = ["n"]; + key = "fg"; + action = "Telescope live_grep"; + options = {noremap = true;}; + } + { + # grep string under cursor + mode = ["n"]; + key = "fs"; + action = "Telescope string_grep"; + options = {noremap = true;}; + } + { + # buffers + mode = ["n"]; + key = "fb"; + action = "Telescope buffers"; + options = {noremap = true;}; + } + { + # help tags + mode = ["n"]; + key = "fh"; + action = "Telescope help_tags"; + options = {noremap = true;}; + } + { + # show recently opened files + mode = ["n"]; + key = "fo"; + action = "Telescope oldfiles"; + options = {noremap = true;}; + } + ]; }