Skip to content

LeonardsonCC/scrips.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 

Repository files navigation

scrips.nvim

Yep, this is just scrips without the t. I know, it's dumb.

scrips-plugin

What this plugin can do for me?

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;

Install

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')

Keymaps

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 })

What I pretend to do

  • 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

About

Help you to find, manage and run your scripts

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Languages