vscode-code-runner
vscode-code-runner copied to clipboard
how to run elixir
想要运行Elixir 代码怎么配置呢?
elixir is already supported. What issue do you meet with?
I have installed elixir on my computer. 运行elixir代码出现如下提示: "Code language not supported or defined."
What configuration should I do to avoid that?
What's the file extension of you elixir file? Is it .ex
or .exs
?
The extension is .ex
doesn't work, but the .exs
works fine.
Also I noticed when I just create a temporary without saving it and change the language mode to Elixir, it will not run the code. But it works fine under the python language mode.
The way I worked around it was to use mix
to run the script and use the script in my root directory (same directory as your mix files).
I just added this into the user settings
"code-runner.executorMap": {
"elixir": "mix run"
}
I second this - Elixir is not supported by default. ctrl+alt+J
does not show "elixir" as a language option.
mix run
only runs .exs
, you need to me explicit if you want to run another extension.
{
"code-runner.executorMapByFileExtension": {
".ex": "mix run --no-mix-exs",
".exs": "mix run"
}
}
mix run
only runs.exs
, you need to me explicit if you want to run another extension.{ "code-runner.executorMapByFileExtension": { ".ex": "mix run --no-mix-exs", ".exs": "mix run" } }
thank you so much for sharing this! you just made my day!