@@ -165,6 +165,15 @@ actions.set_command_line = function(prompt_bufnr)
|
|||||||
vim.cmd(entry.value)
|
vim.cmd(entry.value)
|
||||||
end
|
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.
|
-- TODO: Think about how to do this.
|
||||||
actions.insert_value = function(prompt_bufnr)
|
actions.insert_value = function(prompt_bufnr)
|
||||||
local entry = actions.get_selected_entry(prompt_bufnr)
|
local entry = actions.get_selected_entry(prompt_bufnr)
|
||||||
|
|||||||
@@ -523,6 +523,10 @@ builtin.builtin = function(opts)
|
|||||||
},
|
},
|
||||||
previewer = previewers.qflist.new(opts),
|
previewer = previewers.qflist.new(opts),
|
||||||
sorter = conf.generic_sorter(opts),
|
sorter = conf.generic_sorter(opts),
|
||||||
|
attach_mappings = function(_, map)
|
||||||
|
map('i', '<CR>', actions.run_builtin)
|
||||||
|
return true
|
||||||
|
end
|
||||||
}):find()
|
}):find()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user