v13.1.0
Changelog
v13.1.0
Enhancements
- #2673 - @KronicDeth
- Improved error reporting
- Include 5 lines of context around error elements
- Use
originalFilewhen calculating path, so that.beamfile path is used for decompiled files that don't have aVirtualFile. - Compact line references
- Only including ending line if it is different than starting line.
- Add ending line as a range after starting line instead of a completely separate path and line.
- Put stacktrace in
<details>with<summary>
- Improved error reporting
- #2687 - @KronicDeth
- Update dependencies
gradleto7.4.2gradle-intellij-pluginto1.6.0- Set
-Xjvm-default=allfor Kotlin to allow@JvmDefaultinterfaces- Needed for
LanguageNewProjectWizardsubclasses and associated implementations
- Needed for
- New Project > Language > Elixir includes all mix options
--app--module--sup--umbrella
- Update dependencies
- #2578 - @yordis
- Add
mix formatexternal formatter.
Requires project or module SDK be set in order to run. If the SDK is not available, only the internal formatter will be used. The internal formatter is still used for file subsection formatting and new line indenting asmix formatworks at the file-level.-
Allow
mix formatexternal formatter to be disabled.- Preferences
- Editor > Code Style > Elixir
- Click the
mix formattab - Expand the General group
- Uncheck "Format files with
mix format".
-
- Add
- #2697 - @KronicDeth
- Support Elixir 1.13.0 in debugger.
Bug Fixes
- #2637 - @KronicDeth
- Protect from
nullcontainingFilewhen fetching docs.
- Protect from
- #2639 - @KronicDeth
- Show notification if $HOME_PATH/lib does not exist.
Instead of logging an error show a notification since it can and does happen and is not a bug to be fixed in the
plugin, but a configuration change the user needs to do.
- Show notification if $HOME_PATH/lib does not exist.
- #2640 - @KronicDeth
- Ignore tuples as type restrictions that occur during typing.
- #2641 - @KronicDeth
- Catch
AlreadyDisposedExceptionwhen trying to find module for PsiElement inmostSpecificSdk.- Check if the project
is disposed before using it to get module forPsiElement`.
- Check if the project
- Catch
- #2645 - @KronicDeth
- Look above
CallDefinitionImplforTypescope processing
It should go up to theModuleImplto find theTypeDefinitionImpl.
- Look above
- #2671 - @KronicDeth
- Have Credo Global Inspection use standard
Mix.commandLineused for Run Configurations.- Allow environment variables to be set similar to Run Configurations for projects that require environment variables to be set for Mix tasks due to checks in their config.
- No longer support Include Explanations as it takes too long to run.
- Remove annotator until it can be re-implemented in performant manner using corrected environment and SDK from Global Inspection.
- Have Credo Global Inspection use standard
- #2672 - @KronicDeth
- Look above
<variable>.<tuple>forancestorTypeSpec.- Look above
<tuple>after<variable>.forancestorTypeSpec.
- Look above
- Look above
- #2673 - @KronicDeth
- Fix Find Usages that resolve to compiled types.
- Add element description for
TypeDefinitionImpl- Node Text is
@<module_attribte> <name>(<parameters>) :: ... - Long Name and Short Name are just the
name - Type is
type
- Node Text is
- Mirror
TypeDefinitionImplsto types in decompiled source.
AllowTypeDefinitionImpl.getNavigationto go to decompiled types.
- Add element description for
- Allow types with atom keyword names to be highlight even though they are invalid names.
- Fix Find Usages that resolve to compiled types.
- #2674 - @KronicDeth
- #2675 - @KronicDeth
- Ignore invalid format that occur while user is typing when highlighting types
@type name :: String.()@type String.()@type S
- Ignore invalid format that occur while user is typing when highlighting types
- #2676 - @KronicDeth
- Restore Project configuration for Small IDEs.
I dropped an!when converting fromequalsto==when fixing the deprecation warnings, which made the Project SDK selection only be HIDDEN where it needed to be SHOWN.
- Restore Project configuration for Small IDEs.
- #2679 - @KronicDeth
- Catch
StackOverflowErrorinfind_usages.Provider.getType(). - Element descriptions for
CallDefinitionImpl
- Catch
- #2680 - @KronicDeth
- Highlight
CallDefinitionImplreferences as predefined if resolvedCallDefinitionImplis inKernelorKernel.SpecialForms.
Fixes highlightingdefand other defined when using SDKs without source like Homebrew after the delayed-decompilation fixes from 12.2.1. Now source-less (Homebrew) and SDKs with sources (ASDF) will both be able to highlight predefineds.
- Highlight
- #2681 - @KronicDeth
- No longer record the SDK name as an attribute of the Facet configuration, as it didn't write back changes.
- Instead detect the Elixir SDK by finding any of the libraries that have an Elixir SDK name in the module. (The Elixir SDK was already being added as a library to allow indexing the SDK.)
- Clear out any existing Elixir SDKs listed as module libraries before setting a new SDK.
This eliminates the duplicates that happened before. (It turns out the JetBrains API doesn't prevent duplicates. Oopsie.) It also ensures that no SDK is recorded if the SDK is deselected in the UI, which wouldn't happen before.
- No longer record the SDK name as an attribute of the Facet configuration, as it didn't write back changes.
- #2687 - @KronicDeth
- Handle disposed
Sdk.rootProviderby reloading theSdkwhen loadingebinDirectories - In IntelliJ 2022, the New Project dialog changed and it no longer automatically listed
ModuleType.getBuilderModuleBuilders as potential project builders, so it looked like Elixir New Project support disappeared. Fix this by implementing thenewProjectWizard.languageextension that was added to control the Language switching in the new New Project dialog.
- Handle disposed
- [#2688]](#2688) - @KronicDeth
- Remove references to
ElementClassHintin BeamFileImpl that only work in IntelliJ.
ElementClassHintis part of theprocessDeclarationsystem used in Java and so was in the code becauseBeamFileImplwas original based onClassFileImpl, but since the Elixir resolvers don't use the hint system at all, it can just be removed.
- Remove references to
- #2578 - @yordis
- Remove
CodeStyleSettingsProviderbecause it is redundant withLanguageCodeStyleSettingsProvider
- Remove
- #2695 - @KronicDeth
- Restrict
UsageTargetProvidertoElixirFiles
Without this restriction, it tries to run when developing the plugin itself and breaks Kotlin syntax highlighting.
- Restrict
- #2697 - @KronicDeth
- Fix environment not being passed to debug runs of ESpec and ExUnit Run Configurations.
Theenvfrom theConfigurationwas dropped because a localenvwas created to setMIX_ENVtrue.
- Fix environment not being passed to debug runs of ESpec and ExUnit Run Configurations.
README Updates
Features
Credo
Inspection
Batch Mode
If you'd like to run mix credo use can run it as a global Inspection.
Formatting
IntelliJ Elixir both has an internal formatter used to format new linees and parts of files, but also can use mix format to format entire files.
Formatters
Internal
IntelliJ Elixir's internal formatter can reformat code to follow a consistent style.
External (mix format)
IntelliJ Elixir will run mix format - on the text of the file. As mix format works on entire files, only whole
file, multiple file, or directory formatting is supported using this external formatter. Formatting subsections and
new lines use the internal formatter until the next full file format uses mix format.
NOTE: The module or project SDK MUST be set in order to run mix format. If the SDK is not set, only the internal formatter will be run.
Disabling
mix format can be disabled if you only want to use the Internal Formatter.
- Preferences
- Editor > Code Style > Elixir
- Click the
mix formattab - Expand the General group
- Uncheck "Format files with
mix format".
Format on Save
To tun on format on save:
- Preferences
- Tools > Actions on Save.
- Check "Reformat code".
- Make sure "All file types" is set or at least "Files: Elixir" is set.
Autosave
JetBrains IDEs have autosave turned on by default when you click away from the editor window, but you can adjust the settings:
- Preferences
- Appearance & Behavior > System Settings.
- Check or uncheck the settings in the Autosave section.
Formattables
Directory
All files in a directory can be reformatted using the External Formatter (mix format)
File
Other File
All lines in a file can be reformatted with the External Formatter (mix format).
Current File
All the lines in the current editor tab file can be reformatted with External Formatter (mix format).
Selection
A subset of a file can be reformatted using the Internal Formatter