diff options
| author | Simon Hauser <Simon-Hauser@outlook.de> | 2020-12-10 09:22:46 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-10 09:22:46 +0100 |
| commit | df6b762b317fa11202e1a55671842fe13909de75 (patch) | |
| tree | 819f66721b3e92055c5d079957c5377c8e3368dc /lua/telescope/actions/init.lua | |
| parent | a12d38bac308ce2a7346aef48003325077fdb48a (diff) | |
Feat: symbols json picker (#303)
Diffstat (limited to 'lua/telescope/actions/init.lua')
| -rw-r--r-- | lua/telescope/actions/init.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lua/telescope/actions/init.lua b/lua/telescope/actions/init.lua index aaeffab..b0dcc26 100644 --- a/lua/telescope/actions/init.lua +++ b/lua/telescope/actions/init.lua @@ -230,6 +230,12 @@ actions.run_builtin = function(prompt_bufnr) require('telescope.builtin')[entry.text]() end +actions.insert_symbol = function(prompt_bufnr) + local selection = actions.get_selected_entry() + actions.close(prompt_bufnr) + vim.api.nvim_put({selection.value[1]}, '', true, true) +end + -- TODO: Think about how to do this. actions.insert_value = function(prompt_bufnr) local entry = actions.get_selected_entry(prompt_bufnr) |
