Rename Neovim custom telescope

The keyboard shortcut was already in use.
I therefore renamed custom_functions into custom runs.
That way I can add multiple things in the future.
E.g. the items to select can also be a table which defines the name as
well as what to execute. That way I could add functions, commands and
other things.
This commit is contained in:
Daniel Siepmann 2022-03-23 16:37:26 +01:00
parent 2faf4ac672
commit 774e4f8555
Signed by: Daniel Siepmann
GPG key ID: 33D6629915560EF4
3 changed files with 5 additions and 6 deletions

View file

@ -5,13 +5,13 @@ local actions = require('telescope.actions')
local action_state = require('telescope.actions.state')
local conf = require('telescope.config').values
local custom_functions = function(opts)
local custom_runs = function(opts)
opts = opts or {}
local results = { 'CopyFileName', 'CopyRelativeFilePath', 'CopyFullFilePath' }
pickers.new(opts, {
prompt_title = 'Custom Functions',
prompt_title = 'Custom Runs',
finder = finders.new_table {
results = results
},
@ -28,6 +28,5 @@ local custom_functions = function(opts)
end
return telescope.register_extension({
-- setup = ctags_setup,
exports = { custom_functions = custom_functions },
exports = { custom_runs = custom_runs },
})

View file

@ -14,7 +14,7 @@ nnoremap <leader>pp :Telescope builtin<cr>
nnoremap <leader>pf :Telescope git_files<cr>
nnoremap <leader>pb :Telescope buffers<cr>
nnoremap <leader>pt :Telescope ctags_outline outline<cr>
nnoremap <leader>pc :Telescope custom_functions<cr>
nnoremap <leader>pr :Telescope custom_runs<cr>
nnoremap <silent> <leader>pc :call TelescopeCurrentComposerPackage()<cr>
nnoremap <leader>k :NERDTreeToggle<cr>

View file

@ -27,4 +27,4 @@ require('telescope').setup({
},
})
require('telescope').load_extension('custom_functions')
require('telescope').load_extension('custom_runs')