telescope-scriptrunner
is an extension for telescope.nvim that provides its users with the ability to easily run and
edit pre-written scripts
-- packer.nvim:
use { 'nvim-telescope/telescope-scriptrunner.nvim',
requires = {
{'nvim-lua/plenary.nvim'},
{'nvim-lua/popup.nvim'},
{'nvim-lua/popup.nvim'},
{'voldikss/vim-floaterm'},
},
config = function()
require'telescope'.load_extension'scriptrunner'
-- ... other telescope settings
end,
}
...
-- paq-nvim:
paq 'nvim-lua/plenary.nvim'
paq 'nvim-lua/popup.nvim'
paq 'nvim-telescope/telescope.nvim'
paq 'nvim-telescope/telescope-scriptrunner.nvim'
...
require'telescope'.load_extension'scriptrunner'
Set keybinding like vim.api.nvim_set_keymap('n', '<leader>sr', [[<cmd>lua require'telescope'.extensions.scriptrunner.list{}<CR>]], {noremap=true, silent=true})
and adapt the options listed below.
:Telescope scriptrunner list
key | action |
---|---|
<CR> run in terminal |
Floatterm the found script |
<TAB> |
edit the script |
Directory containing the scripts
Most of the code is directly lifted from telescope-z.
- [] Make todo