From 59ef37ded43a77a4c0f35be434f1ea72a407ce84 Mon Sep 17 00:00:00 2001 From: Simon Zeng Date: Sat, 24 Oct 2020 23:00:22 -0400 Subject: Add telescopes provider (#168) Amendment: replace the old `builtin` --- lua/telescope/actions.lua | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lua/telescope/actions.lua') diff --git a/lua/telescope/actions.lua b/lua/telescope/actions.lua index ebebbea..878ac0e 100644 --- a/lua/telescope/actions.lua +++ b/lua/telescope/actions.lua @@ -165,6 +165,15 @@ actions.set_command_line = function(prompt_bufnr) vim.cmd(entry.value) end +actions.run_builtin = function(prompt_bufnr) + local entry = actions.get_selected_entry(prompt_bufnr) + + actions.close(prompt_bufnr) + vim.cmd [[startinsert]] + + require('telescope.builtin')[entry.text]() +end + -- TODO: Think about how to do this. actions.insert_value = function(prompt_bufnr) local entry = actions.get_selected_entry(prompt_bufnr) -- cgit v1.2.3