summaryrefslogtreecommitdiff
path: root/fnl/config
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2022-07-17 14:42:42 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2022-07-17 14:42:42 +0200
commit55de7e544a98ab64404470ccb681ef2ecc80bc87 (patch)
tree260191305ee3b21f5dd0aa80eb968dca442aed90 /fnl/config
parent8b27601657fff81339458ed15adc808a0634143a (diff)
Move telescope keymaps
Diffstat (limited to 'fnl/config')
-rw-r--r--fnl/config/telescope.fnl13
-rw-r--r--fnl/config/which-key.fnl6
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 :<C-b>
+ "<cmd>lua require('telescope.builtin').buffers(require('telescope.themes').get_dropdown{sort_lastused = true, previewer = false})<cr>"
+ opts)
+ (nvim.set_keymap :n :<C-f>
+ "<cmd>lua require('telescope.builtin').find_files(require('telescope.themes').get_dropdown{previewer = false})<cr>"
+ opts)
+ (nvim.set_keymap :n :<C-t> "<cmd>Telescope live_grep theme=ivy<cr>" 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 [:<cmd>AerialToggle!<CR> "Toggle Aerial"]
:c [:<cmd>AerialClose<CR> "Close Aerial"]}
- :b ["<cmd>lua require('telescope.builtin').buffers(require('telescope.themes').get_dropdown{previewer = false})<cr>"
- :Buffers]
:e [:<cmd>NvimTreeToggle<cr> :Explorer]
:c [:<cmd>Bdelete!<CR> "Close Buffer"]
:n [:<cmd>nohlsearch<CR> "No Highlight"]
- :f ["<cmd>lua require('telescope.builtin').find_files(require('telescope.themes').get_dropdown{previewer = false})<cr>"
- "Find files"]
- :F ["<cmd>Telescope file_browser<cr>" "Browse files"]
- :t ["<cmd>Telescope live_grep theme=ivy<cr>" "Find Text"]
:P ["<cmd>Telescope projects<cr>" :Projects]
:z [:<cmd>ZenMode<cr> "Zen Mode"]
:p {:name :Packer