Yep, this is just scrips without the t
. I know, it's dumb.
At the moment, it'll help you to manage scripts.
- Create a folder to store scripts;
- Create scripts;
- Run the script file;
- Run selection;
- Telescope your script;
Using Packer
use {
"LeonardsonCC/scrips.nvim",
requires = "nvim-lua/plenary.nvim"
}
Setup plugin
require('scrips').setup()
Setup the Telescope extension
require('telescope').load_extension('scrips')
You must set your own keymaps. This is what I personally use:
-- scrips
local scrips = require('scrips')
-- new script
vim.keymap.set('n', '<Leader>en', scrips.new_script, { noremap = true })
-- find scripts
vim.keymap.set('n', '<Leader>se', require('telescope').extensions.scrips.find_file, { noremap = true })
-- Run
vim.keymap.set('n', '<Leader>er', scrips.run_paragraph, { noremap = true })
vim.keymap.set('n', '<Leader>eR', scrips.run_file, { noremap = true })
- Run selection
- Folder to manage scripts in plugin
- Telescope to find scripts managed by the plugin
- Better buffer names
- Run the file based on his shebang e.g.
#! /bin/bash
- Run the paragraph based on his shebang e.g.
#! /bin/bash
- Run paragraph
- Subfolders to help manage the scripts
- Time elapsed
- Custom environment files