mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-06-21 16:39:04 +02:00
update default code runner
This commit is contained in:
parent
a9e51972a9
commit
aa00ff9942
3 changed files with 13 additions and 17 deletions
|
@ -20,4 +20,6 @@
|
||||||
-- }
|
-- }
|
||||||
-- vim.g.pcode_footer = "PCode"
|
-- vim.g.pcode_footer = "PCode"
|
||||||
|
|
||||||
vim.g.pcode_model = 2 -- isi dengan 1 atau 2 untuk model dashboard
|
-- 1 startify model
|
||||||
|
-- 2 dashboard model
|
||||||
|
vim.g.pcode_model = 1 -- isi dengan 1 atau 2 untuk model dashboard
|
||||||
|
|
|
@ -115,14 +115,7 @@ vim.g.pcode_whichkey = {
|
||||||
}
|
}
|
||||||
|
|
||||||
-- https://github.com/CRAG666/code_runner.nvim
|
-- https://github.com/CRAG666/code_runner.nvim
|
||||||
|
-- ready default java, python, typescript, javascript, rust, cpp, scss
|
||||||
vim.g.pcode_coderunner = {
|
vim.g.pcode_coderunner = {
|
||||||
java = "cd $dir && javac $fileName && java $fileNameWithoutExt",
|
|
||||||
python = "python3 -u",
|
|
||||||
typescript = "deno run",
|
|
||||||
rust = "cd $dir && rustc $fileName && $dir/$fileNameWithoutExt",
|
|
||||||
-- cpp="gcc $fileName -lstdc++ -o $fileNameWithoutExt && $fileNameWithoutExt"
|
|
||||||
cpp = "g++ $fileName -o $fileNameWithoutExt && $dir/$fileNameWithoutExt",
|
|
||||||
scss = "sass $dir/$fileName $dir/$fileNameWithoutExt.css",
|
|
||||||
javascript = "node $dir/$fileName",
|
|
||||||
go = "go run $fileName",
|
go = "go run $fileName",
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,20 +4,21 @@ if not status_ok then
|
||||||
end
|
end
|
||||||
|
|
||||||
local rfile = {
|
local rfile = {
|
||||||
-- java = "cd $dir && javac $fileName && java $fileNameWithoutExt",
|
java = "cd $dir && javac $fileName && java $fileNameWithoutExt",
|
||||||
-- python = "python3 -u",
|
python = "python3 -u",
|
||||||
-- typescript = "deno run",
|
typescript = "deno run",
|
||||||
-- rust = "cd $dir && rustc $fileName && $dir/$fileNameWithoutExt",
|
rust = "cd $dir && rustc $fileName && $dir/$fileNameWithoutExt",
|
||||||
-- -- cpp="gcc $fileName -lstdc++ -o $fileNameWithoutExt && $fileNameWithoutExt"
|
-- cpp="gcc $fileName -lstdc++ -o $fileNameWithoutExt && $fileNameWithoutExt"
|
||||||
-- cpp = "g++ $fileName -o $fileNameWithoutExt && $dir/$fileNameWithoutExt",
|
cpp = "g++ $fileName -o $fileNameWithoutExt && $dir/$fileNameWithoutExt",
|
||||||
-- scss = "sass $dir/$fileName $dir/$fileNameWithoutExt.css",
|
scss = "sass $dir/$fileName $dir/$fileNameWithoutExt.css",
|
||||||
|
javascript = "node $dir/$fileName",
|
||||||
}
|
}
|
||||||
|
|
||||||
local data_exists, runscript = pcall(require, "core.config")
|
local data_exists, runscript = pcall(require, "core.config")
|
||||||
if data_exists then
|
if data_exists then
|
||||||
if runscript.coderunner ~= nil then
|
if runscript.coderunner ~= nil then
|
||||||
|
rfile = vim.tbl_deep_extend("force", runscript.coderunner, rfile)
|
||||||
end
|
end
|
||||||
rfile = runscript.coderunner
|
|
||||||
end
|
end
|
||||||
|
|
||||||
code_runner.setup({
|
code_runner.setup({
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue