Skip to content

Latest commit

 

History

History
121 lines (88 loc) · 2.35 KB

README.ja.md

File metadata and controls

121 lines (88 loc) · 2.35 KB

Last commit Repository Stars Issues Open Issues Bug Issues

eyecatch

RunIt

シンプルなプログラムランナー🚀



🍡日本語 🍔English

🚀 使い方

NeoVimで以下のコマンドを実行してください。

:RunIt

設定

setup()内に、拡張子と実行するコマンドをテーブルにして指定してください。 以下はサンプルです。

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

カスタムターミナル

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

⛏️ 開発

このリポジトリをクローンして./lua/runit.luaを編集してください。

📝 Todo

  • コマンドライン引数に対応させる。

📜 ライセンス

MIT

👏 影響を受けたプロジェクト

vim-quickrun.vim