NoSuchMethod errors on GeneratedParserUtilBase, which motivated me to actually ask JetBrains how to fix the problem, where Yann Cébron (@YannCebron)unquote({name, [], nil}) in type specs was brokenDBConnection.Connection.sync_stop/4 for variable resolution not working for pinned variable inreceive clauses.alias, import, require, user) folding.isParameter errors.alias call, from the alias call, you can Go To Declaration for the module itself. - @KronicDethtreeWalkUp now instead of custom code.Suffix resolves to alias Prefix.SuffixSuffix.Nested resolves to alias Prefix.SuffixAs resolves toalias Prefix.Suffix, as: As`NestedSuffix resolves to alias __MODULE__.NestedSuffix__MODULE__StubBased#canonicalName, there now also StubBased#canonicalNames, for when a call defines multiple canonical names, as is the case for defimpl <PROTOCOL>, for: [<TYPE>, ...]. - @KronicDethAllName index, if any nested modules are found for the unaliased name, then those nested names are aliased and also shown for completion. - @KronicDethresolvableName allows nested modules under multiple aliases to be completed. -@KronicDethalias, import, require or use) groups. - @KronicDethas: aliased name to both alias and defmoduleas: aliased name.alias Prefix.Suffixalias Prefix.Suffix, as: Asalias Prefix.{MultipleAliasA, MultipleAliasB}defimpl <PROTOCOL>, for: [<TYPE>, ...] generates multiple canonical names, which are stored in the stub index.AllName index, the defimpl's Implementation will render as if only the defimpl <PROTOCOL>, for: <TYPE> was used for the <TYPE> matching the lookup name in the Goto Symbol dialog. For example, if you search for Tuple,JSX.Encoder.Tuple will match for defimpl JSX.Encoder, for: for: [Tuple, PID, Port, Reference, Function, Any].Ecto defines the clauses of__schema__(:type, ...) using Enum.map, but enclosingMacroCall only knews to jump over enclosing macros like for, so a special case was added for anonymous function given toEnum.map.Call appeared before operations (which are usuallyCalls) like Match.@type unquote({name, nil, []}) :: foo, name will be highlighted as a type parameter even though it is not strictly the name that will appear as a type parameter. - @KronicDethalias and defmodule, as resolving to only the alias loses the nested name, so it wasn't possible to jump to the nested name's defmodule.alias and the defmodule, so you can skip jumping to the alias before jumping to the defmodule.ElixirParser uses the GeneratedParserUtilBase fromcom.intellij.lang.parser, but since that version is a synced copy, it is a snapshot ofGeneratedParserUtilBase from the version of GrammarKit that was current when the IDE was released. To ensure the generated parser works on all the IDEs, I copyGeneratedParserUtilBase from org.intellij.grammar.parser intoorg.elixir_lang.grammar.parser and then use that version in ElixirParser. This ensures neither the IDE's version nor the version in any installed GrammarKit plugin is used.StubIndex.getInstance.getAllKeys(...) is a superset of actual keys in the actual project according to Peter Gromov of JetBrains.canonicalName if it matches the literal name, as the duplicate name leads to duplicate entries in the completion lookup.canonicalNameCollection was renamed to canonicalNameSet (with type changing fromCollection<String> to Set<String> to match) to emphasize that the canonical names should be unique, but canonicalNameSet itself should still include duplicates of name for those places where only canonical names are used.resolvableName for the unaliasedName for MultipleAliases Aliases, so that they complete correctly for nested modules.SSHView) and only complete nested Aliases (i.e. SSH.Key).When you start typing an Alias, completion will look in three locations:
alias aliased names in the current file a. Suffix for alias Prefix.Suffix b. MultipleAliasA orMultipleAliasB for alias Prefix.{MultipleAliasA, MultipleAliasB} c. As for alias Prefix.Suffix, as: AsPrefix.Suffix from defmodule Prefix.Suffix b. MyProtocol from defprotocol MyProtocol c. MyProtocol.MyStruct i. defimpl MyProtocol, for: MyStruct ii. defimpl MyProtocol nested under defmodule MyStructSuffix.Nested for alias Prefix.Suffix wherePrefix.Suffix.Nested is an indexed module, implementation or protocol name. b.MultipleAliasA.Nested for alias Prefix.{MultipleAliasA, MultipleAliasB} wherePrefix.MultipleAliasA.Nested alias Prefix.{MultipleAliasA, MultipleAliasB} is an indexed module, implementation or protocol name. c. As.Nested for alias Prefix.Suffix, as: Aswhere Prefix.Suffix.Nested is an indexed module, implementation, or protocol name.Go To Declaration is a feature of JetBrains IDEs that allows you to jump from the usage of a symbol, such as a Module
Alias, to its declaration, such as the defmodule call.
alias a. Suffix if alias Prefix.Suffix called b. MultipleAliasA if alias Prefix.{MultipleAliasA, MultipleAliasB} called c. As if alias Prefix.Suffix, as: AsCmd+B b. Select Navigate > Declaration from the menu. c. Cmd+Clickalias that setup the aliased name or jumping directly to defmodule of the unaliased name. Select which declaration you want a. Use arrow keys to select and hit Enter b. ClickA.B in A.B.func() b. A.B in alias A.B c. B inalias A.{B, C}Cmd+B b. Select Navigate > Declaration from the menu. c. Cmd+ClickIf you hold Cmd and hover over the Alias before clicking, the target declaration will be shown.