Skip to content

Latest commit

 

History

History
122 lines (88 loc) · 2.13 KB

File metadata and controls

122 lines (88 loc) · 2.13 KB

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