Skip to content

Commit

Permalink
fix(telescope): <space>p will show all commands and builtin ex commands
Browse files Browse the repository at this point in the history
User should upgrade ad-telescope-extensions.nvim and telescope-extension-maker.nvim to latest
  • Loading branch information
adoyle-h committed May 20, 2024
1 parent d2ff1eb commit 0be1c8e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions lua/one/plugins/telescope/keymaps.lua
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
return function()
local util = require('one.util')
local tb = require('telescope.builtin')
local te = require('telescope').extensions
local opts = { silent = true }

local map = {

{ 'n', '<space>;', require('telescope').extensions.find_pickers.find_pickers },
{ 'n', '<space>;', te.find_pickers.find_pickers },
{ 'n', '<space>f', ':Telescope find_files<cr>', opts },
{ 'n', '<space>n', ':Telescope message<cr>', opts },

Expand Down Expand Up @@ -50,8 +51,11 @@ return function()
{ silent = true, desc = 'Fuzzy find content with selection in workspace' },
},

{ 'n', '<space>p', ':Telescope commands<cr>', opts },
{ 'v', '<space>p', tb.commands, { silent = true, desc = 'List commands with selection' } },
{ 'n', '<space>p', ':Telescope cmdline<cr>', opts },
{ 'v', '<space>p', function()
local text = util.getVisualSelection()
te.cmdline.cmdline({ default_text = text })
end, { silent = true, desc = 'List commands with selection' } },

-- Press '<Enter>' to execute command immediately.
-- Press '<Ctrl-e>' to edit command in terminal mode.
Expand Down

0 comments on commit 0be1c8e

Please sign in to comment.