I have IntelliJ IDEA installed on Windows 10, along with the Elixir plug-in. Auto-complete and syntax highlighting are working correctly. I am new to IntelliJ, so I am not clear how to use all the functionality.
If I have an .exs script file, how exactly do I run it within IntelliJ editor? I tried configuring and “IeX” configuration, but don’t know what values to use for “iex arguments” or “Environmental variables”.
I just need a way to write some code within IntelliJ and then have it executed. Any help would be appreciated.
I can not say anything about IntelliJ, as I haven’t used it in ages and never liked the elixir plugin in particular.
Anyway, if you want to run a script, you typically use a terminal and run
elixir my_script.exs or
mix run my_script.exs depending on your context.
mix run there should be a “runner” option in the plugin. If you were so kind posting a screenshot of the runners options, I might be able to guide you through setting it up.
Anyway, if you need to set up environment variables, you probably know. Though as you don’t, you probably do not need them :D.
NobbZ: Thank you for your reply.
Based on your answer, at this point, I will just stick with running the script from a terminal. I am using Windows 10 and I am beginning to realize that most of the documentation around IntelliJ/Elixir is geared towards Mac/Linux. I have googled for countless hours how to use IntelliJ on Windows to create Elixir code, but I haven’t found much. (I will try using using WSL2 soon, so being on Windows might stop being an issue.)
I am finding this forum quite useful though.