From 75376f9c8b0804618d229defe39b9257128dcc44 Mon Sep 17 00:00:00 2001 From: Andy Shen Date: Thu, 7 Mar 2024 12:19:37 +0800 Subject: [PATCH 1/5] Add Erlang language run support. --- package.json | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index d5a7b98..642e829 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "code-runner", "displayName": "Code Runner", - "description": "Run C, C++, Java, JS, PHP, Python, Perl, Ruby, Go, Lua, Groovy, PowerShell, CMD, BASH, F#, C#, VBScript, TypeScript, CoffeeScript, Scala, Swift, Julia, Crystal, OCaml, R, AppleScript, Elixir, VB.NET, Clojure, Haxe, Obj-C, Rust, Racket, Scheme, AutoHotkey, AutoIt, Kotlin, Dart, Pascal, Haskell, Nim, D, Lisp, Kit, V, SCSS, Sass, CUDA, Less, Fortran, Ring, Standard ML, Zig, Mojo", + "description": "Run C, C++, Java, JS, PHP, Python, Perl, Ruby, Go, Lua, Groovy, PowerShell, CMD, BASH, F#, C#, VBScript, TypeScript, CoffeeScript, Scala, Swift, Julia, Crystal, OCaml, R, AppleScript, Elixir, VB.NET, Clojure, Haxe, Obj-C, Rust, Racket, Scheme, AutoHotkey, AutoIt, Kotlin, Dart, Pascal, Haskell, Nim, D, Lisp, Kit, V, SCSS, Sass, CUDA, Less, Fortran, Ring, Standard ML, Zig, Mojo, Erlang", "version": "0.12.1", "featureFlags": { "usingNewPythonInterpreterPathApi": true, @@ -184,7 +184,8 @@ "fortran_fixed-form": "cd $dir && gfortran $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt", "fortran": "cd $dir && gfortran $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt", "sml": "cd $dir && sml $fileName", - "mojo": "mojo run" + "mojo": "mojo run", + "erlang": "cd $dir && erlc $fileName && erl -noshell -s $fileNameWithoutExt start -s init stop" }, "description": "Set the executor of each language.", "scope": "resource" @@ -223,7 +224,8 @@ ".cu": "cd $dir && nvcc $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt", ".ring": "ring", ".sml": "cd $dir && sml $fileName", - ".mojo": "mojo run" + ".mojo": "mojo run", + ".erl": "cd $dir && erlc $fileName && erl -noshell -s $fileNameWithoutExt start -s init stop" }, "description": "Set the executor of each file extension.", "scope": "resource" From 413fd362bb4262091311db7775f1b02065cd64dc Mon Sep 17 00:00:00 2001 From: Andy Shen Date: Mon, 11 Mar 2024 14:18:48 +0800 Subject: [PATCH 2/5] Fix: use escript to take the place of erl. --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 642e829..dea8eb7 100644 --- a/package.json +++ b/package.json @@ -185,7 +185,7 @@ "fortran": "cd $dir && gfortran $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt", "sml": "cd $dir && sml $fileName", "mojo": "mojo run", - "erlang": "cd $dir && erlc $fileName && erl -noshell -s $fileNameWithoutExt start -s init stop" + "erlang": "cd $dir && escript $fileName" }, "description": "Set the executor of each language.", "scope": "resource" @@ -225,7 +225,7 @@ ".ring": "ring", ".sml": "cd $dir && sml $fileName", ".mojo": "mojo run", - ".erl": "cd $dir && erlc $fileName && erl -noshell -s $fileNameWithoutExt start -s init stop" + ".erl": "cd $dir && escript $fileName" }, "description": "Set the executor of each file extension.", "scope": "resource" From a7210b0864556e47126335544fa8b5c51bfe253c Mon Sep 17 00:00:00 2001 From: Andy Shen Date: Tue, 12 Mar 2024 12:33:52 +0800 Subject: [PATCH 3/5] Update package.json Co-authored-by: Jun Han --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index dea8eb7..bee592f 100644 --- a/package.json +++ b/package.json @@ -185,7 +185,7 @@ "fortran": "cd $dir && gfortran $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt", "sml": "cd $dir && sml $fileName", "mojo": "mojo run", - "erlang": "cd $dir && escript $fileName" + "erlang": "escript" }, "description": "Set the executor of each language.", "scope": "resource" From 06ebb892c12b4414c666e38af56ed6b9d9b65cd1 Mon Sep 17 00:00:00 2001 From: Andy Shen Date: Tue, 12 Mar 2024 12:34:00 +0800 Subject: [PATCH 4/5] Update package.json Co-authored-by: Jun Han --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index bee592f..fed5b95 100644 --- a/package.json +++ b/package.json @@ -225,7 +225,7 @@ ".ring": "ring", ".sml": "cd $dir && sml $fileName", ".mojo": "mojo run", - ".erl": "cd $dir && escript $fileName" + ".erl": "escript" }, "description": "Set the executor of each file extension.", "scope": "resource" From e548d58f21c1bb2daecc330da5a9941cebcee493 Mon Sep 17 00:00:00 2001 From: Andy Shen Date: Tue, 12 Mar 2024 14:48:44 +0800 Subject: [PATCH 5/5] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ae53a74..db671e7 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Join the chat at https://gitter.im/formulahendry/vscode-code-runner](https://badges.gitter.im/formulahendry/vscode-code-runner.svg)](https://gitter.im/formulahendry/vscode-code-runner?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) ![Downloads](https://img.shields.io/visual-studio-marketplace/d/formulahendry.code-runner) ![Rating](https://img.shields.io/visual-studio-marketplace/r/formulahendry.code-runner) [![Actions Status](https://github.com/formulahendry/vscode-code-runner/actions/workflows/main.yml/badge.svg)](https://github.com/formulahendry/vscode-code-runner/actions/workflows/main.yml) -Run code snippet or code file for multiple languages: **C, C++, Java, JavaScript, PHP, Python, Perl, Perl 6, Ruby, Go, Lua, Groovy, PowerShell, BAT/CMD, BASH/SH, F# Script, F# (.NET Core), C# Script, C# (.NET Core), VBScript, TypeScript, CoffeeScript, Scala, Swift, Julia, Crystal, OCaml Script, R, AppleScript, Elixir, Visual Basic .NET, Clojure, Haxe, Objective-C, Rust, Racket, Scheme, AutoHotkey, AutoIt, Kotlin, Dart, Free Pascal, Haskell, Nim, D, Lisp, Kit, V, SCSS, Sass, CUDA, Less, Fortran, Ring, Standard ML, Zig, Mojo**, and custom command +Run code snippet or code file for multiple languages: **C, C++, Java, JavaScript, PHP, Python, Perl, Perl 6, Ruby, Go, Lua, Groovy, PowerShell, BAT/CMD, BASH/SH, F# Script, F# (.NET Core), C# Script, C# (.NET Core), VBScript, TypeScript, CoffeeScript, Scala, Swift, Julia, Crystal, OCaml Script, R, AppleScript, Elixir, Visual Basic .NET, Clojure, Haxe, Objective-C, Rust, Racket, Scheme, AutoHotkey, AutoIt, Kotlin, Dart, Free Pascal, Haskell, Nim, D, Lisp, Kit, V, SCSS, Sass, CUDA, Less, Fortran, Ring, Standard ML, Zig, Mojo, Erlang**, and custom command ## Book for VS Code