IntelliJ Elixir - Elixir plugin for JetBrain's IntelliJ Platform

Version 10.4.0

Donate

Thanks

  • For requesting espec support
  • For reporting missing runReadAction

Changelog

v10.4.0

Enhancements

Bug Fixes

  • #1410 - @KronicDeth
    • Only show Run/Debug ExUnit when *_test.exs files exist.
    • Only show Run/Debug ESpec when *_spec.exs files exist.
  • #1415 - Wrap UnqualifiedNoArgumentCall.quote identifier.text in runReadAction. - @KronicDeth
  • #1419 - Fix typos in CONTRIBUTING.md - @nschulzke
  • #1420 - Prevent the module attribute annotator from running in EEx files. - @nschulzke

README Changes

Features

Run/Debug Configurations

mix espec

The mix espec task gets a special type of Run Configuration, Elixir Mix Espec. Using this Run Configuration type instead, of the basic Elixir Mix Run Configuration will cause the IDE to attach a special formatter to mix espec, so that you get the standard graphical tree of Test Results.

The Run pane will show Test Results. If there is a compilation error before or during mix espec, it will be shown as a test failure. If the compilation failure is in a _spec.exs file can it can be inferred from the stacktrace, the compilation error will show up as a test failure in that specific module.

Using graphical formatter

If you override the default formatters you will need to add the following code to your spec_helper.exs.

If you override formatters similar to below

ESpec.configure fn(config) ->
  config.formatters ...
ESpec.configure fn(config) ->
  config.formatters [
      {ESpec.Formatters.Json, %{out_path: "results.json"}},
      {ESpec.Formatters.Html, %{out_path: "results.html"}},
      {ESpec.Formatters.Doc, %{details: true, out_path: "results.txt"}},
      {ESpec.Formatters.Doc, %{details: true, diff_enabled?: false, out_path: "results-no-diff.txt"}},
      {ESpec.CustomFormatter, %{a: 1, b: 2}},
    ]
end

Replace them with code that checks for the graphical formatter TeamCityESpecFormatter and uses only it when available.

ESpec.configure fn(config) ->
  config.formatters(if Code.ensure_loaded?(TeamCityESpecFormatter) do
    [{TeamCityESpecFormatter, %{}}]
  else
    ...
  end)
end
ESpec.configure fn(config) ->
  config.formatters(if Code.ensure_loaded?(TeamCityESpecFormatter) do
    [{TeamCityESpecFormatter, %{}}]
  else
    [
      {ESpec.Formatters.Json, %{out_path: "results.json"}},
      {ESpec.Formatters.Html, %{out_path: "results.html"}},
      {ESpec.Formatters.Doc, %{details: true, out_path: "results.txt"}},
      {ESpec.Formatters.Doc, %{details: true, diff_enabled?: false, out_path: "results-no-diff.txt"}},
      {ESpec.CustomFormatter, %{a: 1, b: 2}},
    ]
  end)
end
Creating mix espce Run Configurations Manually
  1. Run > Edit Configurations…

  2. Click +

  3. Select “Elixir Mix ESpec”

  4. Fill in the “mix espec arguments” with the argument(s) to pass to mix espec. Normally, this will be list of *_spec.exs files, relative to the “Working directory”.

    NOTE: Unlike mix test, mix espec does not support directories as arguments.

  5. (Optionally) fill in “elixir arguments” with the arguments to elixir before it runs mix test.

  6. (Optionally) fill in "erl arguments"with the arguments toerlbefore it runselixir`.

  7. Fill in the “Working directory”

    • Type the absolute path to the directory.
    • Select the path using directory picker by clicking the ... button
  8. (Optionally) click the ... button on the “Environment variables” line to add environment variables.

  9. Click “OK” to save the Run Configuration and close the dialog

With the Run Configuration defined you can either Run or Debug the mix especs

Running
  1. Click the Run arrow in the Toolbar to run the mix test task
  2. The Run pane will open showing the Test Results
Debugging
  1. (Optionally) before debugging, customize the modules that will be interpreted.
    1. Run > Edit Configurations…
    2. Click the “Interpreted Modules” tab next to default “Configuration” tab.
    3. Enable/Disable “Inherit Application Module Filters”. Will change the Module Filters show in the below “Do not interpreter modules matching patterns” list.
    4. Uncheck any inherited module filters that you would rather be interpreted and therefore debuggable
    5. Click + to add module filters that are specific to this configuration. This can be useful if you know interpreting a specific module in your project’s dependencies or project leads to too much slowdown when debugging or causes the debugger to hang/crash.
    6. Click - to remove configuration-specific module filters added with +. Inherited module filters cannot be removed with -, they can only be disabled by unchecking.
  2. For how to use the debugger, including how to set breakpoints see the Debugger section.
  3. Click the Debug bug in the Toolbar to debug the mix tests

While you can create Elixir Mix ESpec run configurations manually using the Run > Edit Configurations... menu, it is probably more convenient to use the context menu.

Creating mix espec Run Configurations from context

The context menu must know that the the directory, file, or line you are right-clicking is a test. It does this by checking if the current directory or an ancestor is marked as a Test Sources Root and contains or is a *_spec.exs file(s)

  1. In the Project pane, ensure your OTP application’s espec directory is marked as a Test Sources Root
  2. Check if the espec directory is green. If it is, it is likely a Test Sources Root. This color may differ in different themes, so to be sure you can check the context menu
  3. Right-click the test directory.
  4. Hover over “Mark Directory As >”
    • If “Unmark as Test Sources Root” is shown, then the directory is already configured correctly, and create from context will work.

    • If “Test Sources Root” is shown, then the directory need to be configured by clicking that entry

Creating/Running mix espec Run Configurations from directory
  1. Right-click the directory in the Project pane

  2. Click “Run Mix ExUnit”, which will both create the Run Configuration and Run it.

    • If you want to only create the Run Configuration, select “Create Mix ESpec” instead

Alternatively, you can use keyboard shortcuts

  1. Select the directory in the Project pane.
  2. Ctrl+Shift+R will create the Run Configuration and Run it.
Creating/Running mix espec Run Configurations from file
  1. Right-click the file in the Project pane
  2. Click “Run Mix ESpec”, which will both create the Run Configuration and Run it.
    • If you want to only create the Run Configuration, select “Create Mix ESpec” instead

Alternatively, you can use keyboard shortcuts

  1. Select the directory in the Project pane.
  2. Ctrl+Shift+R will create the Run Configuration and Run it.

Finally, you can use the editor tabs

  1. Right-click the editor tab for the test file you want to run

  2. Click “Run Mix ESpec”, which will both create the Run Configuration and Run it.

    • If you want to only create the Run Configuration, select “Create Mix ESpec” instead
Creating/Running mix espec Run Configurations from line

If you want to be able to run a single test, you can create a Run Configuration for a line in that test

  1. Right-click a line in the test file

  2. Click “Run Mix ESpec”, which will both create the Run Configuration and Run it.

    • If you want to only create the Run Configuration, select “Create Mix ESpec” instead

Alternatively, you can use keyboard shortcuts

  1. Place the cursor on the line you want to test
  2. Ctrl+Shift+R will create the Run Configuration and Run it.

Installation Instructions

2 Likes

Thanks @KronicDeth. Can’t wait to try it out.

Version 10.5.0

Donate (Average is $30.29 USD.)

Thanks

Changelog

v10.5.0

Enhancements

  • #1445 - @KronicDeth
    • Replace comparator with Comparator.reverseOrder()
    • The correct home path for kiex is ~/.kiex/elixirs/elixir-VERSION/lib/elixir as that contains the true lib and bin directory, but users may select other directories by mistake, so doing the following adjustments:
      • Adjust bin home path to lib/elixir.
      • Adjust elixirs/elixir-VERSION home path to elixirs/elixir-VERSION/lib/elixir.
  • #1462 - Use reflections to allow saving settings when creating the projects before in 2018.3 and 2019.1 even though the API changed. - @KronicDeth

Bug Fixes

  • #1443 - @KronicDeth
    • In RubyMine, attach OTP applications as separate projects with Elixir facets instead of directly creating ELIXIR_MODULE modules in DirectoryConfigurator. This matches the manual steps of opening the OTP apps as separate directories after opening the root of the project.
      • Mark directories when adding facet
      • Sync libraries when adding facet or attaching to root project. Ensures External Libraries show up for all OTP applications.
    • Convert Small IDE projects with ELIXIR_MODULEs:
      1. Remove ELIXIR_MODULE *.iml files
      2. Remove ELIXIR_MODULE entries root project’s modules.xml file.
      3. Lack of modules in project in doOpenProject will trigger DirectoryProjectConfigurators to be run, which will setup the project and run DirectoryConfigurator to attach the apps OTP apps and Elixir facets.
        • Only support automatic attaching multiple OTP apps as separate projects in Rubymine. In IntelliJ normal support for multiple Modules in one Project still works.
  • #1444 - Increase suspect nameSet size to 15 to support geo. geo has 13 String.Chars implementations. - @KronicDeth
  • #1445 - @KronicDeth
    • Remove obsolete SdkType. I keep confusing it with its replacement org.elixir_lang.sdk.elixir.Type!
    • Check that HomePath has ebin paths when validation. Prevents selecting false HomePaths for kiex.
  • #1446 - Adding missing ESpec template. When reviewing #1410 I missed that the template wasn’t in resources. :man_facepalming: - @KronicDeth
  • #1447 - Ignore targets when calculating Dep path. - @KronicDeth
  • #1448 - Ignore organization when calculating Dep path. - @KronicDeth
  • #1449 - Get view provider document in read action. - @KronicDeth
  • #1450 - Support rebar.config deps that are name only. - @KronicDeth
  • #1456 - Always use containingFile for QualifiableAlias maxScope for getReference. Prevents cache capturing maxScope, which can vary based on invocation. - @KronicDeth
  • #1462 - @KronicDeth
    • Create new project before attaching it in Small IDEs.
      When attaching a directory to a project during startup, saving is disallowed, so the attached directory only has a workspace.xml in its .idea when the attach is attempted. Attaching requires the .idea/*.iml Module file, so the attaching fails, saying the directory is an unsupported format.

      Experimentation showed that manually attaching the directory also did not work, but opening the directory in a separate window, then opening and attaching it again would make the directory have the full project files. To mimic this manual process:

      1. The internals of doOpenProject are copied
      2. A save of the project files is forced, bypassing the normal “startup” save blocker
      3. The project is attached to the root project.

      Tested to work when upgrading from 10.4.0 to 10.5.0-pre in Rubymine when no project was already open.

    • Check if project can be attached instead of if RubyMine
      Although GoLand supports attaching projects, it doesn’t work for non-Go projects, so it is also excluded. How the support appears in each non-IntelliJ IDEA is shown below:

      IDE Works?
      Android Studio YES Android Studio is built on top of IntelliJ, so it has full multi-Module support. It is not Small IDE.
      CLion NO No Attach to Project support to multiple module support.
      DataGrip No DataGrip doesn’t have a Project View and doesn’t support Attach to Project. You can still run tests if you directly open the file.
      GoLand NO Modules show up, but independent projects are not attached as in other Small IDEs, so disabled. In general, the Go settings, like Test Runners always win, so it is recommended to not use GoLand at all for Elixir development.
      PHPStorm YES The projects are listed in Directories. The Languages & Frameworks > Elixir shows all 3 projects. Right-clicking on the marked Test directory will not show the Elixir Run Configuration, Python ones win, but subdirectories and *_test.exs will show up in the context menu.
      PyCharm YES The root project is listed in Project. app/* projects are listed listed as Project Dependencies of the root Project. The Languages & Frameworks > Elixir shows all 3 projects. Right-clicking on the marked Test directory will not show the Elixir Run Configuration, Python ones win, but subdirectories and *_test.exs will show up in the context menu.
      Rider No Solution system is separate from Project system.
      Rubymine YES The projects are listed in Project Structure. The Languages & Frameworks > Elixir shows all 3 projects. Right-clicking on the marked Test directory will not show the Elixir Run Configuration, Python ones win, but subdirectories and *_test.exs will show up in the context menu.
      WebStorm NO No Attach to Project support or multiple module support.
    • Don’t count Android Studio as a Small IDE. It includes Project Structure menu with multiple-language, multiple-Module per Project support from IntelliJ.

Installation Instructions

2 Likes

Version 10.5.1

Donate (Average is $30.29 USD.)

Thanks

Changelog

v10.5.1

Bug Fixes

  • #1483 - @KronicDeth
    • Numerous users have reported that annotation can encounter a StackOverflowError. A reproduction case shows that they are called by Phoenix Web modules where one function containing quote block uses the same module again, such as an admin_view depending on the base view through use App.Web, :view. When the use App.Web, :view is resolving, the defmacro __using__ is re-entered as is the admin_view because there was no tracking of already visited PsiElements. The fix is to track the visited elements and not re-enter the visited elements so that admin_view is skipped and the other call definition clauses can be checked to find view.

Installation Instructions

2 Likes

Version 10.6.0

Donate (Average is $30.29 USD.)

Thanks

  • For reporting that Evaluate was broken in the Debugger for Elixir 1.8 because the private APIs changed.
  • For reporting that the SDK home directory suggestions did not cover Linux Mint.

Changelog

v10.6.0

Enhancements

  • #1492 - Add Linux Mint Erlang and Elixir home paths to SDK home path suggestions. Linux Mint installs to /usr/lib/erlang and /usr/lib/elixir instead of /usr/local/lib/erlang and /usr/local/lib/elixir. - @KronicDeth

Bug Fixes

  • #1491 - @KronicDeth
    • Elixir 1.8 made :elixir.quoted_to_erl/3 private, so in Elixir 1.8+, the debugger needs to inline the private version to maintain < 1.8 and >= 1.8 compatibility.
    • Reformat debugger for Elixir 1.8

Installation Instructions

3 Likes

Version 11.0.0

Donate (Average is $30.29 USD.)

Thanks

  • For reporting how totally breaking the breaking changes in 2019.2 were

Changelog

v11.0.0

Enhancements

  • #1545 - @KronicDeth
    • Simplifications due to only supporting IntelliJ 2019.2
      • Don’t use reflection for error report Submitter
      • Don’t use deprecated WeakHashMap. It was needed for backwards compatibility, but since this build is for 2019.2 only, no compatibility is necessary and it clears up the long warnings from the logs for end users.
      • Remove reflection from OutputToGeneralTestEventsConverters. Only 2019.2 is now supported, so no need for complicated backwards compatibility.
      • Only support IntelliJ 2019.2 in Travis CI
    • Remove Elixir 1.5 and 1.6 builds as they are both > 1 year since the last release approximately.

Bug Fixes

  • #1545 - @KronicDeth
    • IntelliJ 2019.2 compatibility
      • Explicitly depend on java plugin. 2019.2 extracted the Java functionality to a plugin (as outlined here), which includes the JPS builder used for Project Build functionality.

      • Remove project converterts. Project converters are broken in 2019.2 because the DialogWrapper they try to launch isn’t being launched in the Event Dispatch Thread (EDT) (https://youtrack.jetbrains.com/issue/IDEA-218071).

        As this is bug in code wholey controlled by upstream, the only option is to remove the project converters. The work-around is for users to re-import projects when a project layout update is necessary.

      • Fix nullability of override arguments in ChooseByNameModel

      • Don’t use dependency injection for OpenProcessor builder. JetBrains has removed dependency injection for Extensions in 2019.2.

      • Don’t pass a null name ot findSdk

Incompatible Changes

  • #1545 - @KronicDeth
    • Changes needed for 2019.2 compatibility make this build incompatible with earlier releases.

Installation Instructions

5 Likes

Version 11.0.1

Donate (Average is $30.29 USD.)

Thanks

  • For reporting that IntelliJ 2019.2 compatibility changes in v11.0.0 broke Rubymine compatibility

Changelog

v11.0.1

Bug Fixes

  • #1548 - @KronicDeth
    • The java plugin dependency needs to be declared so that it shows up for compiling the JPS builder system and the project importer in IntelliJ and Android Studio, but it needs to be optional, so that the plugin is still compatible with Rubymine and the other small IDEs.

Installation Instructions](https://github.com/KronicDeth/intellij-elixir/blob/v11.0.1/README.md#installation)

3 Likes

Version 11.1.0

Donate (Average is $30.29 USD.)

Thanks

Changelog

v11.1.0

Enhancements

  • #1587 - @KronicDeth
    • Update gradle plugins
      • gradle-intellij-plugin (org.jetbrains.intellij) to 0.4.10
      • org.jetbrains.kotlin.jvm to 1.3.50
      • de.undercrouch.download to 4.0.0
    • Update IDEA version in builds
      • 2019.2 -> 2019.2.2

Bug Fixes

  • #1582 - @KronicDeth
    • Don’t log if partial or no header typeID is read. It happens too often due to .beam files being written partially to disk during the build process. They will be re-indexed when they are complete.
  • #1587 - @KronicDeth
    • Update gradle intellij plugin to fix runIde on newer macOS.
  • #1588 - @KronicDeth
    • Fix ConcurrentModificationException in Structure View

      Java 9 fixed a bug (https://bugs.openjdk.java.net/browse/JDK-8071667) in HashMap where computeIfAbsent did not check for concurrent modifications, and it turns out that TreeElementList was using concurrent modifications, so it was now broke.

      Fixed by use get or put if it is absent, so that putNew can ensure that the CallDefinition is in the TreeElementList before it is added to the MutableList<TreeElement>, which was the original reason why there was a put inside of computeIfAbsent, which would have put when the function returned anyway.

Installation Instructions

2 Likes

Version 11.2.0

Donate (Average is $30.29 USD.)

Thanks

Changelog

v11.2.0

Enhancements

Bug Fixes

  • #1589 - @KronicDeth
    • Don’t error on runtume in mix deps. guardian is too common of a dependency and too many users have the version with the typo installed.
  • #1569 - @chitacan
    • Fix IEx Mix Run/Debug Configuration for asdf by using absolute path to mix.
  • #1595 - @KronicDeth
    • Add OTP 22 and 23 opcodes to Code BEAM Chunk Viewer
      • put_tuple/2
      • bs_get_tail/3
      • bs_start_match3/4
      • bs_get_position/3
      • bs_set_position/2
      • swap/2

Installation Instructions

4 Likes

Version 11.3.0

Donate (Average is $30.29 USD.)

Thanks

  • For reporting that Windows was reporting the SDKs were corrupt due to quoting issues

Changelog

v11.3.0

Enhancements

Bug Fixes

  • #1607 - @hoodaly
    • Fix must specify non-empty ‘commandLine’ parameter
  • #1608 - @KronicDeth
    • GeneralCommandLine's escaping for Windows can’t handle the parentheses in a way that both works for the Windows shell and Elixir running the code the shell hands off. Removing the parentheses leaves runnable code even if it is no longer formatted.

      Fixes “Unknown Version” naming for Elixir SDKs and the “Probably SDK installed in … is corrupt” dialog from appearing.

README Updates

Show Parameters

The parameter names for the current call can be shown (⌘+P/Ctrl+P)

Installation Instructions

2 Likes

Version 11.4.0

Donate (Average is $30.29 USD.)

Changelog

v11.4.0

Enhancements

  • #1617 - @KronicDeth
    • Previously, the arity of a function or macro could only disagree with the definition and resolve if

      1. The arity of the call was in the arity range of the definition and the ResolveResult was marked as a validResult.
      2. The code is marked as incomplete (because the IDE detects typing, etc) and the arity mismatches and the ResolveResult is marked as an invalid result.

      By marking all arity mismatches, regardless of incompleteness of the code as an invalid result, Go To Definition and Show Parameters works when the the arity is incorrect. This makes Show Parameters work while typing out a call without the correct number of commas and allows jumping to the definition while typing out the call too.

Installation Instructions

1 Like

Version 11.5.0

Donate (Average is $30.29 USD.)

Changelog

v11.5.0

Enhancements

  • #1630 - @KronicDeth
    • Ignore the incompleteCode flag and instead always use the criteria used when incompleteCode was set.

      name prefix exact name ResolveResult valid
      :x: N/A :x: N/A
      :white_check_mark: :x: :white_check_mark: :x:
      :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:

      This extends #1617 to more cases.

      • Qualified calls (Process.flag(...), etc)
      • Type specs (@spec foo(...))
      • Aliases (alias Foo...)
      • Module Attributes (@attribute)
      • Variables (foo)
      • Protocol reserved module attributes (@protocol and @for)

Bug Fixes

Installation Instructions

3 Likes

Version 11.6.0

Donate (Average is $30.29 USD.)

Thanks

Changelog

v11.6.0

Enhancements

Bug Fixes

  • #1646 - @seanwash
    • Swap improperly sized General.QuestionDialog icon for RunConfigurations.TestUnknown icon for Unknown icon in Structure View.
  • #1632 - @ortex
    • Fix MODULENAME variable in defm live template, so that the file name is camel-cased before being capitalized.
  • #1643 - @zrma
    • Update README.md about information for Goland IDE since has been released for awhile and no longer only an EAP.
  • #1735 - @KronciDeth
  • #1738 - @Koziolek
    • JetBrains IDEs 2020.1 compatibility
      • Change obsolete references to AllocIcons in Icons to new ones in AlllIcons that are recommended in documentation.
      • Update to @NotNull annotation on PsiElementVisitor
        • DepGatherer
        • QuotableImpl.quote
  • #1745 - @KronciDeth
    • Fix tests for IDEA 2020.1.
  • #1753 - @KronciDeth
    • Get ProjectImportProvider builder in doGetBuilder instead of constructor.

      Fixes use of deprecated constructor dependency injection that is incompatible with dynamic, injectable plugins in 2020.1.

      com.intellij.diagnostic.PluginException: getComponentAdapterOfType is
      used to get org.elixir_lang.mix.project._import.Builder(
        requestorClass=org.elixir_lang.mix.project._import.Provider,
        requestorConstructor=protected org.elixir_lang.mix.project._import.Provider(org.elixir_lang.mix.project._import.Builder)
      ).
      
      Probably constructor should be marked as NonInjectable. [Plugin: org.elixir_lang]
      
  • #1685 - @gerritwalther
    • Allow underscores in binary (0b), octal (0o) , and hexadecimal (0x) numbers.

Installation Instructions

4 Likes

Version 11.6.1

Donate (Average is $30.29 USD.)

Thanks

Changelog

v11.6.1

Bug Fixes

Installation Instructions

5 Likes

Version 11.7.0

Donate (Average is $30.29 USD.)

Thanks

  • For reporting that if two module attributes start with the same letters, then later in the code, the shorter one is falsely flagged as an ‘Unresolved module attribute’.
  • For reporting and fixing! that iex and erl arguments not being saved for IEx Mix Run Configurations

Changelog

v11.7.0

Enhancements

  • #1781 - @KronicDeth
    • Convert annotator.ModuleAttribute to Kotlin
      • Apply optional Kotlin transformations.

Bug Fixes

  • #1781 - @KronicDeth
    • Check if at least one resolution for module attribute references is valid

      Previously, it was checked if module attributes resolved to exactly one declaration, but this is no longer true with the looser reference resolution that allows invalid results for PisPolyVariantReference. resolve() will return null when there is more than one result from multiResolve even if some are invalid, so we need to explicitly check if the PsiReference is a PsiPolyVariantReference and if so check if any are valid.

    • Fix deprecation warnings for annotator.ModuleAttribute.

    • Quick fixes for inlinables in annotator.ModuleAttribute.

  • #1774 - @odk211
    • Fix iex and erl arguments not being saved for IEx Mix Run Configurations.

Installation Instructions

5 Likes

Version 11.8.0

Donate (Average is $30.29 USD.)

Thanks

  • For reporting that unchecking Show Method Separators did not turn off the method separator above @doc and @spec
  • For reporting that the formatter did not work properly in EEx templates

Changelog

v11.8.0

Enhancements

  • #1792 - @marcindawidziuk
    • Quick documentation (F1/Ctrl+Q)
  • #1807 - @niknetniko
    • Run Icons in gutter next to ExUnit tests. The icon changes to the state of the test: green for passing and red for failing.

Bug Fixes

  • #1788 - @KronicDeth
    • Fix Unchecking Show Method Separator still showing on @doc and @spec.

      Previously, unchecking Show Method Separator would still show the method separator if it was the module attributes (such as @doc and @spec) associated with the call definition (def, defp, defmacro, or defmacrop) and only disabled the ones directly above the call definition. This is fixed by checking if method separators are enabled in getLineMarkerInfo(PsiElement) instead of the specialized getLineMarkerInfo(Call), so that the check happens for both module attributes and call definitions.

  • #1786 - @odk211
    • Remove “Unresolved module attribute” error annotation because module attributes cannot be resolved through use yet, so current annotation is a false positive in those cases.
  • #1801 - @niknetniko
    • Use SimpleTemplateLanguageFormattingModelBuilder for EEx files, so that the TemplateDataLanguage (i.e. html when the extension is .html.eex) formatter is used instead of the Elixir formatter.

Installation Instructions

5 Likes

Version 11.8.1

Donate (Lowest/Median/Mean/Record is $1/14.19/26.34/200.00 USD.)

Thanks

Changelog

v11.8.1

Bug Fixes

  • #1822 - @KronicDeth
    • Vendor JInterface 1.11 to support BIG_CREATION when debugging.
      The JInterface on Maven Central has stopped being updated because the OTP Team didn’t actually maintain it, that was Basho, and Basho is gone now. This version of JInterface, 1.11, is from Erlang 23.0.4 from Homebrew, but with the formula edited (brew edit erlang) to add --with-java and then built with brew install erlang --build-from-source.
  • #1823 - @KronicDeth
    • On Windows, the file.path to the debugger server files has \, but they aren’t escaped. Therefore, replace them with escaped version, \\ to fix debugging on Windows, but leave Linux and macOS unaffected.

Installation Instructions

3 Likes

Is there any advantage to using a licensed vs community version of a JetBrains IDE? In my case, I have a GoLand license but would I be better off using just IntelliJ Community Edition with the Elixir plugin?

1 Like

Supporting Elixir (or any language that isn’t a language-specific IDE’s language) is a work-around outside of IntelliJ. The Elixir support is setup as a Framework (i.e. the API that JetBrains made to support Web Frameworks) instead of the Project’s Language. The Elixir support will always work better in IntelliJ Community or Ultimate edition because Elixir really can be the Project language.

There is also the benefit that the intelliJs have support for multiple Modules, and this can be mapped to each Elixir application if you’re using an umbrella or poncho setup.

2 Likes

Version 11.9.0

Donate (Lowest/Median/Mean/Record is $1/14.19/26.34/200.00 USD.)

Thanks

  • For reporting that -1 could not be parsed as a case clause.
  • For reporting that newlines could not be escaped at the end of heredocs.

Changelog

v11.9.0

Enhancements

  • #1844 - @KronicDeth
    • Make plugin updatable without a restart when installing from the JetBrains Marketplace. (If installing from file on GitHub you still need to restart due to a limitation in the JetBrains API.). JetBrains refers to this as a Dynamic Plugin.
      • Convert DepsWatcher from project component to project listener
      • Convert Watcher from module component to project listener
      • Make org.elixir_lang.packageManager extension point dynamic
    • Remove unnecessary assert.
    • Replace if with when
    • Include asd tool version
      Prevent me screwing up the quoter cache using the wrong elixir version again.
    • Update gradle project
      • gradlew 6.7.1
      • org.jetbrains.intellij 0.6.3
      • org.jetbrains.kotlin.jvm 1.3.70
      • de.undercouch.download to 4.4.1
    • Update to GitHub Environment Files
  • #1859 - @KronicDeth
    • Update CI to Elixir 1.11.2 and Erlang 23.1
      • Quoting (for verification of correspondences between plugin and Elixir native lexer and parser.)
        • Port elixir-lang/elixir#9725
          • Indentations for sigil binaries with complex content.
            Makes sure the indentation metadata is added to sigils that have content with metadata already.
        • Quote charlist the same as string when used for a quoted atom
        • Port elixir-lang/elixir@e89e9d874bf803379d729a3bae185052a5323a85
        • Add sigil delimiter to metadata
          Ports elixir-lang/elixir#9671
          • Have 3 character delimiter for heredocs
        • Add no_parens: true metadata
          Port elixir-lang/elixir@8e7befb1087bd37d5acb883e21925b1c0eb0a55f
      • Remove elixir-lang parsing tests for files that don’t exist in Elixir 1.11
      • Add missing @Deprecated to match overridden method
      • Format expected and actual quoted
        Makes the diff not be a one-liner. so easier to spot the difference.
      • Convert Quoter to Kotlin
      • Regenerate Parser for newer GrammarParser version.
      • Port elixir-lang/elixir@1e4e05ef78b3105065f0a313bd0e1e78b2aa973e
  • #1834 - @marcindawidziuk
    • Rewrote the DocumentationProvider so it no longer relies on invoking mix (which I admit was more like a hack than a real solution). This now works so quickly that it actually makes sense to show docs on mouse hover.
      • It can get the documentation from both the source code and decompiled .beam files.
    • Decompilation of documentation was implemented according to EEP-48.
    • The experience on navigating through decompiled file has also been improved a bit
      • See the @moduledoc and @docs
      • See if a function has been deprecated
      • See the original signature of the function (instead of just p0, p1, …).

Bug Fixes

  • #1844 - @KronicDeth
    • Fix deprecation warnings for IntelliJ IDEA 2020.2
      • Replace fileTypeFactory extensions with fileType
      • Convert fileTypes to Kotlin
      • Replace uses of deprecated Project#baseDir
      • Replace uses of deprecated ContainerUtil.newHashMap
      • Replace defaultLiveTemplatesProvider with defaultLiveTemplates
      • spaceExistanceTypeBetweenTokens replaced with spaceExistenceTypeBetweenTokens
      • Replace ListCellRendererWrapper with SimpleListCellRenderer
      • Replace StdFileTypes.PLAIN_TEXT with FileTypes.PLAIN_TEXT
      • Replace LanguageSubstitutors.INSTANCE with getInstance()
      • Replace ReportMessages.ERROR_REPORT with ReportMessages.getErrorReport()
      • Replace DefaultProgramRunner with GenericProgramRunner
        • Have only one runner for all configurations in plugin since body of runner was all the same for non-debug.
      • Don’t override deprecated flushBufferBeforeTerminating()
      • Don’t override deprecated acceptsFile
      • Override initExtra(Project) instead of initExtra(Project, MessageBus, Engine)
      • Replace NamedFoldingDescriptor with FoldingDescriptor
        • Convert folding.Builder to Kotlin
      • Replace file with value for @Storage annotation
      • Replace checkBox(fieldName, title) with checkBox(title, getter, setter)
      • Replace com.intellij.util.contains.Predicate with java.util.function.Predicate
      • Replace CodeStyleSettingsManager with CodeStyle
      • Replace Comparing.equal with Objects.equals
      • Replace UsageType(String) with UsageType(Supplier)
      • Replace PluginManager with PluginManagerCore
      • Replace WakValueHashMap with createWakeValueMap
      • Don’t pass Pass to LineMarkerInfo
      • Replace newArrayListWithCapacity with ArrayList
      • Replace newIdentityHashMap with IdentityHashMap
      • Replace RefElement#element with #psiElement
      • Pass columnMargin to setupCheckboxColumn
      • Extensions.getExtensions(name) -> name.extensionList
      • Extensions.findExtension -> ExtensionPointName.findExtensionOrFail
      • Object -> Any
      • Replace choseAndSetSdk with SdkPopupFactory
    • Fix error reporting formatting
      • Fix new lines around excerpts so that code blocks quote correctly
      • Use FILE:LINE format for excerpt location, so it can be used in editors for rapid lookup.
      • Separate title from message
      • Remove use of ErrorBean
      • Pass project for LevelPropertyPusher DumbModeTask
      • Don’t use constructor injection for SetupSDKNotificationProvider
      • Don’t use AnnotationHolder::create* APIs and use AnnotationBuilder instead.
        • Convert Annotators to Kotlin
      • Use logger.error directly instead of LogMessageEx
    • Fix Atom annotator to only annotator within current element.
      Annotation keyword pair’s key and colon instead of annotating the keyword key and the colon outside of it.
    • Fix Macro parsing in DbgI
      • ifAccessToString
        I missed taking the 3rd element of the tuple to get [Access, :get] and was checking the outer tuple directly.
        • Convert beam.assembly.ParserDefinition to Kotlin
      • ifWhenToString where as should be as?
    • Suppress unused variables for TODO()s
    • Remove unnecessary Line chunk dependency on Atom chunk
    • Switch unused unsignedInt values to _ as Kotlin doesn’t support _name
    • Use key instead of environment for computeIfAbsent
    • Replace lambda with constructor reference
    • Remove unnecessary !!s
    • Replace mapIndexed with map because index is unused
    • Remove open that has no effect in object
    • Fix is overrides by converting to Kotlin
    • Remove unused Call from Implementation. and CallDefinitionClause .elementDescription(Call, ElementDescriptionLocation).
    • Don’t shadow resolveResultList in addToResolveResultList
    • Remove useless ?:
    • Remove unnecessary != null
    • Fix named argument calling by using super argument name
    • Change Float.from(ByteArray, Int) to TODO() as implementation is invalid.
    • Remove unused ModuleChooserDialog
    • Setup EncodingManager for ParsingTestCase
    • Remove redundant internal
    • Don’t highlight resolved callables along with referrers
      Newest annotation API asserts that the annotator only annotates the PsiElement being visited, so can’t highlight the resolved call definitions at the same time anymore.
  • #1859 - @KronicDeth
    • Differentiate signs, unary +/-, and addition/subtraction in lexer.
      Fix parsing of -1 for case clauses (#1316) by more strictly parsing decimal exponent signs differently than addition/subtraction and differently from unary + and -. No longer have a “dual” operation emitted from the lexer like the Elixir native lexer and instead use specific tokens for each use case so that the parser doesn’t need to decide on the operation.
    • Heredoc with escapable newlines (#1843)
      Heredocs allow the final newline to be escaped so you can write a heredoc in the code, but have no newlines in the string term at runtime.
    • Fix terminators docs to show closing version and not opening version
  • #1866 - @KronicDeth
    • Protect against IndexOutOfBounds from highlighterIterator in QuoteHandler.

Installation Instructions

5 Likes