Skip to content

Comamoca/runit.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Last commit Repository Stars Issues Open Issues Bug Issues

eyecatch

RunIt

The simple program runner🚀



🍔English 🍡日本語

🚀 How to use

To run the following command on NeoVim.

:RunIt

Settings

In setup(), specify a table of extensions and commands to run. Below is a sample.

local function isNodejs()
	local packagejson = "package.json"

	if vim.fn.findfile(packagejson, "./") == packagejson then
		return true
	else
		return false
	end
end

require("runit").setup({
	js = function(file)
		if isNodejs() then
			return "node" .. file
		else
			return "deno run -A " .. file
		end
	end,
	ts = function(file)
		return "deno run -A " .. file
	end,
	mjs = function()
		return "node" .. file
	end,
	py = function(file)
		return "python" .. file
	end,
})

Custom terminal

You can customize to use other terminal on runit.

require("runit").setup({
	mjs = function()
		return "node" .. file
	end,
	py = function(file)
		return "python" .. file
	end,
}, "Deol")

⬇️ Install

  • dein.vim
[[plugins]]
repo = "https://github.com/Comamoca/runit.nvim"
on_cmd = ["RunIt"]
  • dein.vim(toml)
call("dein#add", "https://github.com/Comamoca/runit.nvim")

⛏️ Development

Clone this repository and edit ./lua/runit.lua.

📝 Todo

  • Correspond to command line arguments.

📜 License

MIT

👏 Affected projects

vim-quickrun.vim

About

The simple program runner🚀

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages