From 55de7e544a98ab64404470ccb681ef2ecc80bc87 Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Sun, 17 Jul 2022 14:42:42 +0200 Subject: Move telescope keymaps --- fnl/config/telescope.fnl | 13 +++++++++++-- fnl/config/which-key.fnl | 6 ------ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/fnl/config/telescope.fnl b/fnl/config/telescope.fnl index 0f327f1..0d33d40 100644 --- a/fnl/config/telescope.fnl +++ b/fnl/config/telescope.fnl @@ -1,5 +1,7 @@ ;; Telescope a highly extendable fuzzy finder over lists. -(module config.telescope {autoload {util util}}) +(module config.telescope {autoload {util util nvim aniseed.nvim}}) + +(def- opts {:noremap true :silent true}) (let [telescope (util.load-plugin :telescope)] (let [actions (require :telescope.actions)] @@ -72,4 +74,11 @@ :case_mode :smart_case}}}) (telescope.load_extension :fzf) (telescope.load_extension :file_browser) - (telescope.load_extension :projects))) + (telescope.load_extension :projects) + (nvim.set_keymap :n : + "lua require('telescope.builtin').buffers(require('telescope.themes').get_dropdown{sort_lastused = true, previewer = false})" + opts) + (nvim.set_keymap :n : + "lua require('telescope.builtin').find_files(require('telescope.themes').get_dropdown{previewer = false})" + opts) + (nvim.set_keymap :n : "Telescope live_grep theme=ivy" opts))) diff --git a/fnl/config/which-key.fnl b/fnl/config/which-key.fnl index 063a3da..75c90b1 100644 --- a/fnl/config/which-key.fnl +++ b/fnl/config/which-key.fnl @@ -42,15 +42,9 @@ :a {:name :Aerial :a [:AerialToggle! "Toggle Aerial"] :c [:AerialClose "Close Aerial"]} - :b ["lua require('telescope.builtin').buffers(require('telescope.themes').get_dropdown{previewer = false})" - :Buffers] :e [:NvimTreeToggle :Explorer] :c [:Bdelete! "Close Buffer"] :n [:nohlsearch "No Highlight"] - :f ["lua require('telescope.builtin').find_files(require('telescope.themes').get_dropdown{previewer = false})" - "Find files"] - :F ["Telescope file_browser" "Browse files"] - :t ["Telescope live_grep theme=ivy" "Find Text"] :P ["Telescope projects" :Projects] :z [:ZenMode "Zen Mode"] :p {:name :Packer -- cgit v1.2.3-70-g09d2