intellij-elixir

Elixir plugin for JetBrain's IntelliJ Platform (including Rubymine)

OTHER License

Stars
1.8K
Committers
55

Bot releases are visible (Hide)

intellij-elixir - v4.3.0-dev+20160901144352

Published by KronicDeth about 8 years ago

Canary build of v4.3.0-dev at 2016-09-01T14:43:52Z

intellij-elixir - v4.3.0-dev+20160822081835

Published by KronicDeth about 8 years ago

Canary build of v4.3.0-dev at 2016-08-22T08:18:35Z

intellij-elixir - v4.2.0

Published by KronicDeth about 8 years ago

Thanks

  • Thanks to Filip Haglund (@drathier) and Andrei Dziahel (@develop7) for reporting reproduction cases for map update arguments not working with isVariable
  • Thanks Gerard de Brieder (@smeevil) for testing the canary build and finding the the do end completion mistakenly completed do: end.
  • Andrei Dziahel (@develop7) for find a working reproduction that Go To Symbol broke when trying to display def in the else of an if with Plug.Endpoint.
  • Nima Shariatian @nimashariatian for requesting I add the delimiter auto-insertion and matching.
  • Thanks to Jorg Heymans (@jorgheymans), Andrew Phillipo @aphillipo, and Filip Haglund (@drathier) on their input on the usability issues with the doc template and the need for @doc.

Changelog

v4.2.0

Enhancements

  • #371 - @KronicDeth
    • BraceMatcher
      • Matches the following pairs:
        • do to end
        • fn to end
        • """ to """
        • ''' to '''
        • << to >>
        • < to >
        • [ to ]
        • { to }
        • ( to )
      • Completes the following pairs:
        • [ with ]
        • { with }
        • ( with )
    • QuoteHandler completes standard quotes (that start with " or ')
      • ' with '
      • " with "
      • ''' with '''
      • """ with """
    • TypedHandler completes the non-standard quotes and braces
      • do with end
      • fn with end
      • <<with>>`
      • < with > (for promoters)
      • / with / (for promoters)
      • | with | (for promoters)

Bug Fixes

  • #372 - Check parent for isVariable(ElixirMapUpdateArguments) - @KronicDeth
  • #374 - @KronicDeth
    • IntelliJ 15.0.4 is no longer available from JetBrains, so if the cache is not available, the builds don't work, so use 15.0.6, which is available in 15.0.4's place as the test version for 15.X.
    • IntelliJ 2016.2 is no longer available from JetBrains, so if the cache is not available, the builds don't work, so use 2016.2, which is available in 2016.1's places at the test version for 2016.X.
  • #378 - enclosingMacroCall could climb out the stab after a do, but not the else in an if, which is used for defined functions conditionally in Phoenix.Endpoint.server/0 - @KronicDeth
  • #380 - A lot of ppl use the doc template after already typing @, but the doc template starts with @, so it ends up inserting @@doc .... The @doc template is the same code, but since the name starts with @, it doesn't insert a second @. Unfortunately, the template search code doesn't prompt when just typing @, so you end up having to type @doc before only one template is selected. The @doc template will show in the lookup as soon as @d is typed, but you have to select it from the list then before tabbing to accept. - @KronicDeth
  • #381 - Look at end of do instead of start for end completion to stop ignoring the : in do:, when caret - 3 would land on the o, now all tests are meant to land on the o, so do: won't complete with end incorrectly anymore. - @KronicDeth
  • #382 - Ignore ElixirVariable in highlightTypesAndTypeParameterUsages - @KronicDeth

README Updates

Delimiters

Auto-inserting

The right-delimiter will be automatically inserted when the left
delimiter is typed. In some cases, to prevent false positives, the
the delimiter is only completed if when used for sigils.

Preceded By Left Right
do end
fn end
[ ]
{ }
( )
' '
''' '''
" "
""" """
<< >>
~<sigil-name> < >
~<sigil-name> / /
~<sigil-name> ` `

Matching

All delimiters that are auto-inserted are also matched for highlighting

Left Right
do end
fn end
[ ]
{ }
( )
' '
''' '''
" "
""" """
<< >>
< >
/ /
` `
intellij-elixir - 4.2.0-dev+20160812134719

Published by KronicDeth about 8 years ago

Canary build of 4.2.0-dev at 2016-08-12T13:47:19

intellij-elixir - v4.1.0

Published by KronicDeth about 8 years ago

Thanks

  • Thanks to Jimmi Fragkos (@FraDim) and Mariusz Nosiński (@marioosh) for voting for Code Folding
  • Thanks to Andrei Dziahel (@develop7), Gerard de Brieder (@smeevil), and César Izurieta (@cesarizu) for voting for Multiple Alias (A.{B, C}) support. Special thanks to Alexander Merkulov (@merqlove) for guilting me to support this Elixir 1.2 (!) feature that I knew about since September 2015 after he let me know not having it broke parsing on over half his code and for supplying test repositories.
  • Thanks to Filip Haglund (@drathier) for reporting a second reproduction of the stack trace linking bug
  • Thanks to @swieckib and @fcruxen for reporting the Variable scope processor wasn't checking if the PsiElements were null, as can happen with error handling recovery.
  • Thanks to @swieckib and @zan-kusterle for reporting where isParameter failed
  • Thanks to Nicholas Schell (@Nicholi), Calinoiu Alexandru Nicolae (@alexandru-calinoiu), and Christian Meter (@n2o) for reporting that the mix --version output changed AGAIN for Elixir 1.3. Thanks to Christian Meter (@n2o), Gonzalo Gabriel Jiménez Fuentes (@mendrugory), Roeland (@r03), Serhij Korochanskyj (@webzepter) for confirming the fixed worked in the Canary build.
  • Thanks to Bulat Gaifullin (@bgaifullin) for reporting errors with Match#processDeclarations.

Changelog

v4.1.0

Enhancements

  • #331 - @KronicDeth
    • Allow do end blocks to fold to do: ...
    • Allow -> operator and the right operand to fold to -> ...
    • Allow @doc, @moduledoc and @typedoc value to fold to "...".
    • Fold runs of adjacent alias, import, require, or use to be followed to a single alias, import, require, or use followed by ....
  • #334 - Function separators - @KronicDeth
    • Show a function separator (Preferences > Editor > General > Appearance > Show method separators) above the group of @doc, @spec and def, defp, defmacro, and defmacrop (call definition clauses) of the same name and arity range. Arity range will be used if one of the call definition clauses uses default arguments.
  • #337 - @KronicDeth
    • @for folds to the resolved module name in defimpl
    • @protocol folds to the protocol name in defimpl
  • #343 - Share code between mix and elixir version parsing. - @KronicDeth
  • #344 - @KronicDeth
    • Allow Unknown modulars in the Structure pane, in addition to Go To Symbol. Their icon is a big ? to indicate their correct usage is unknown.
  • #348 - @KronicDeth
  • #349 - Have both QualifiedBracketOperation and UnqualifiedBracketOperation extend BracketOperation, so that BracketOperation can be used to match both when the qualification does not matter. - @KronicDeth
  • #364 - @KronicDeth
    • Regenerate parser with GrammarKit 1.4.2

    • ElixirSdkRelease is now Comparable, so version checks can be done for tests to restrict them to Elixir 1.2+ for multiple alias support.

    • Resolve Multiple Aliases with unqualified Alias in tuples.

    • canonicalName borrows from the idea of PsiReference#canonicalText: an element can have both a Name (from getName), which is the literal name in the code, which can be renamed, and a Canonical Name, which is the name to refer to the element without need for imports or aliases. For this change, defimpl, defmodule, and defprotocol will show their full module Alias for their Canonical Name.

      This change addresses the use case of Go To Declaration that should resolved to a nested defmodule.

Bug Fixes

  • #330 - Check if parameter is null before Variable#execute call in Variable#execute(PsiElement[], ResolveState). - @KronicDeth
  • #336 - Fix isVariable and variableUseScope for var!(name)[...] - @KronicDeth
  • #337 - @KronicDeth
    • @for is no longer marked as unresolved in defimpl and instead resolve to the either the <name> in for: <name> or the module name for the enclosing module when for: is not given.
    • @protocol is no longer marked as unresolved in defimpl and instead resolve to the <name> in defimpl <name>.
  • #342 - @KronicDeth
    • Instead of assert checkRight || checkLeft in Match#processDeclaraions, do the normal code if checkRight || checkLeft and log an error report otherwise, so that the exact code that trigger this error can be reported and the method fixed to handle that form of Match later.
  • #343 - Be able to parse mix version from 1.3.0+ - @KronicDeth
    • Check all lines of output for mix version as Elixir 1.3.0 changed the format of mix --version, so that it includes the Erlang header (Erlang/OTP ... [erts-...] [source] [64-bit] [smp:..:..] [async-threads:..] [hipe] [kernel-poll:false] [dtrace]) on the first line and Mix <version> on the 3rd line. Previously the parsing expected Mix <version> to be the first line.
  • #344 - @KronicDeth
    • If no known modular (Module, Implementation, Protocol, Quote, or Use) matches the call, then use Unknown, which accepts any macro with a do block or keyword. This allows Go To Symbol to no error in projects using Dogma as defrule is now treated as Unknown instead of causing an error that the enclosing modular could not be found.
  • #349 - BracketOperations are neither parameters nor variables. - @KronicDeth
  • #353 - Fix stacktrace linking picking wrong file with same basename - @KronicDeth
    • Strip spaces from front of file path in mix output, which allows file looks to work correctly.
    • Ensure file reference highlight doesn't include the leading and trailing characters by fix off-by-one errors.
  • #358 - Determine whether to check left, right, or both by doing isAncestor checks for all operands, not just the normalized operand. The normalized operand is still used for PsiScopeProcessor#execute since #execute is not expected to handle error elements. - @KronicDeth
  • #364 - @KronicDeth
    • Add A.{B, C} to grammar with quoting to check consistence with Elixir 1.2. Ports elixir-lang/elixir#3666.
    • Use fullyQualifiedName instead of getName for resolvableName because fullyQualifiedName is needed so that qualified aliases inside of the { } of a multiple alias will not have a name as getName is null for those qualified aliases because the name from getName has to be a literal name that can be renamed and qualified names can't be renamed.
  • #365 - The Module icon got the same icon as Unknown when creating Unknown somehow, I assume due to find-replace. - @KronicDeth

README Updates

Code Folding

You can collaspe (fold) pre-defined regions of your Elixir code to make it easier to quickly scroll through files or hide details you don't care about right now.

Controls

Collapsing
  1. Position cursor between lines with with downward facing - arrow and upward facing - arrow.
  2. Cmd+-
Expanding
  1. Position cursor on the collapsed line with the square +
  2. Cmd++

Regions

Expanded Collapsed Folded By Default?
do end do: ... No
-> and right operand -> ... No
@doc VALUE @doc "..." No
@moduledoc VALUE @moduledoc "..." No
@typedoc VALUE @typedoc "..." No
alias ALIAS1 alias ALIAS1 alias ... Yes
import ALIAS1 import ALIAS2 import ... Yes
require ALIAS1 require ALIAS2 require ... Yes
use ALIAS1 use ALIAS2 use ALIAS1 Yes
@for FOR in defimpl PROTOCOL, for: FOR Yes
@protocol PROTOCOL in defimpl PROTOCOL, for: FOR Yes
@MODULE_ATTRIBUTE VALUE in @MODULE_ATTRIBUTE VALUE Yes
intellij-elixir - 4.1.0-dev+2016080513375

Published by KronicDeth about 8 years ago

Canary build of 4.1.0 at 2016-08-05T13:37:59Z

intellij-elixir - 4.1.0-dev+20160712024727

Published by KronicDeth over 8 years ago

Canary build of v4.1.0 built at 2016-07-12T02:47:27Z

intellij-elixir - v4.0.0

Published by KronicDeth over 8 years ago

Thanks

  • Thanks to Alexey Poimtsev (@alec-c4), @swieckib, Jorg Heymans (@jorgheymans), Andrei Dziahel (@develop7), and Khaaliq DeJan (@MisterDeejay) for reporting test cases for "Prefix operation does not have 2 children, but 1"
  • Thanks to @wliirl, @aCandidMind, Julius Beckmann (@h4cc), @developerworks, and Christoph Drießen (@cedriessen) for reporting IntelliJ version-compatibility and build issues.
  • Thanks to Evgen (@doctorx) for reporting that character tokens couldn't be type highlighted.
  • Thanks to Koziołek (@Koziolek) and Povilas Skruibis (@povilas) for reporting null argument to getDescriptiveName when trying to rename a variable.
  • Thanks to @wliirl for reporting a problem showing the Structure of parts of Ecto.
  • Thanks to Vlad Shcherbin (@VladShcherbin) for encouraging me to implement additionalTextAttributes to improve the syntax highlighting
  • Thanks to Jorg Heymans (@jorgheymans) for trying to rename parameters, so that I knew there was user demand for the feature.

Changelog

v4.0.0

  • Enhancements
    • #314 - Call references for unqualified no argument calls that work as variables or parameters - @KronicDeth
      • Resolve and highlight parameter references
        • Resolve call definition clause (def(macro)?p?) parameters to themselves
        • Resolve call definition parameter with default to itself
        • Add Parameter ot Color Settings Page
        • Parameters in any macro with do block or keyword pair
      • Resolve and highlight variable references
        • Properly identifier variable declared in for comprehension as variable
        • Add Variable to Color Settings Page
        • Highlight bind quoted keyword key as Variable
        • Resolve references to earlier && operands, which handles code that matches a variable and only uses the variable on success like ((cwd = cwd()) && write_tmp_dir(cwd))
        • Resolve variables from destructure
      • Detect bitstring segment options and don't treat them as variables.
        • Highlight bitstring segment type options as Type, the same highlight as used for @type names.
        • Don't generate (unresolved) references for bitstring segment options
      • Resolve _ to only itself, no matter how many are used to reflect that it is non-binding, while _<name> will resolve to _<name> as it does bind.
        • Add Ignored Variable to Color Settings Page
      • Reimplement module attribute renaming so that variable renaming can be implemented using a different validator for renaming (since module attribute names include the @). Non-inplace renaming should also be supported, but inplace is preferred. (There's a setting to turn off in-place renaming in JetBrains IDEs.)
      • operation.infix.Normalized
        • Normalizes leftOperand, operator, and rightOperand for an Infix operation that may have errors (in either operand). If there is an error in the operand then its normalized value is null.
      • Keyword key type descriptions
        • Default to "keyword key".
        • Detect bind_quoted: usage and call those "quote bound variable".
      • Add interfaces to unify matching of Matched and Unmatched form of operations when the code cares about the operator
        • And
        • UnaryNonNumericOperation
      • Add processDeclarations to support variable and parameter resolution using PsiTreeUtil.treeWalkUp and PsiScopeProcessors
        • ElixirStabBody
        • StabOperations
      • Treat variables and parameters as NamedElements, so they can be Rename Refactored.
      • Move reused Module and Function names to org.elixir_lang.psi.name.{Module,Function} constants.
      • Parameter and Variable completion
    • #318 - Highlight keyword keys (key: in key: value) that aren't quotes ("key": value or 'key': value) as Atom. - @KronicDeth
    • #320 - @KronicDeth
      • Show annotator applied highlights in the Preferences > Editor > Colors & Fonts > Elixir.
        • Errors
        • Alias
        • Braces and Operators
          • Bit (<< and >>)
          • Braces ({ and })
          • Brackets ([ and ])
          • Char Tokens (?)
          • Comma (,)
          • Dot (.)
          • Interpolation (#{ and })
          • Maps and Structs
            • Maps (%{ and })
            • Structs (%{ and } when used for struct. The Alias is still highlighted using Alias)
          • Operation Sign
          • Parentheses (( and ))
          • Semicolon (;)
        • Calls
          • Function (currently only combined with Predefined to highlight Kernel functions. Will be used later for all function calls once function references are implemented.)
          • Macro (curently only combined with Predefined to highlight Kernel and Kernel.SpecialForms macros. Will be used later for all macro calls once macro references are implemented.)
          • Predefined (Combined with Function to highlight Kernel functions. Combined with Macro to highlight Kernel and Kernel.SpecialForms macros.)
        • Escape Sequence
        • Module Attributes
          • Documentation (Previously Documentation Module Attributes)
            • Text (Previously Documentation Text)
          • Types
            • Callback (my_callback in @callback my_callback() :: :ok or my_macro_callback in @macrocallback my_macro_callback)
            • Specification (my_function in @spec my_function() :: :ok)
            • Type
              • typ and integer in @type typ :: integer
              • parameterized in @type parameterized(type_parameter) :: type_parameter
              • typtyp in @opaque typtyp :: 1..10
              • typ and typtyp in @callback func(typ, typtyp) :: :ok | :fail
              • binary and utf8 in << "hello" :: binary, c :: utf8, x = 4 * 2 >> = "hello™1"
          • Type Parameters (type_parameter in @type parameterized(type_parameter) :: type_parameter)
        • Numbers
          • Binary, Decimal, Hexadecimal, and Octal Digits (Previously at top-level.)
          • Decimal Exponent, Mark and Separator (Previously at top-level)
          • Invalid Binary, Decimal, Hexadecimal, and Octal Digits (Previously at top-level.)
          • Non-Decimal Base Prefix (Previously at top-level.)
          • Obsolete Non-Decimal Base Prefix
        • Variables
          • Ignored
          • Parameter
          • Variable
      • Recover in expression until close of subexpression
        • \n
        • \r\n
        • >>
        • ]
        • }
        • )
        • ;
        • ->
        • end
        • after
        • catch
        • else
        • rescue
      • Update Preferences > Editor > Colors & Fonts > Elixir example text's bitstring syntax to Elixir post-1.0.0 (Use - to separate segment options instead of a list.)
      • Use same algorithm for ElixirStabBody and ElixirFile because they are sequences of expressions.
      • Highlight atom keywords (false, nil, and true) as merge of Atom and Keyword text attributes. If both only use foreground color, Keyword wins.
      • Annotate QualifiableAlias as Alias.
      • Highlight keyword list and map keywords (<key>:) as Atom.
      • Add with to highlighted special forms
    • #322 - Additional Text Attributes - @KronicDeth
      • Default text attributes for "Darcula" and "Default" themes: almost every Text Attribute Key has a unique hue for the Foreground color.
      • Explain how to add additionalTextAttributes to plugin.xml in CONTRIBUTING.md
      • Group Textual Text Attribute Keys Together: Next "Textual" group is created and "Character List", "Escape Sequence", "Sigil", and "String" are moved under the group.
      • Describe relations between different text attributes in COLOR_SCHEMA_DESIGN.xml, so they can be applied to different base schemes, such as applying the current Darcula additonalTextAttributes to Default.
  • Bug Fixes
    • #314 - @KronicDeth
      • Don't generate module attribute references for control attributes: Module attributes that control compilation or are predefined by the standard library: @behaviour, @callback, @macrocallback, @doc, @moduledoc, @typedoc, @spec, @opaque, @type, and @typep, should not have references because their uses are unrelated.
      • Drop requirement that there are 2 children and only require there be 1 and assume that is the Operator.
      • Don't count @(...) as a module attribute usage: Module attribute declarations are defined as defmacro @(...) in Kernel and that @ should count as a function name, not a prefix for a module attribute name.
      • Allow null Module for Scratch File use scope
      • Default to "call" for Call type
      • Fix typo that had *Two operations using Type interface
      • Don't process AccessExpression declarations
    • #316 - @KronicDeth
      • Highlight foo in @spec foo as a type, which occurs while typing a new @spec before :: can be typed.
      • Check if leftOperand is null even when checkLeft is true because checkLeft can be true and leftOperand is null when the lastParent is the operand or operation as a whole, but there is an error in the unnormalized leftOperand leading to the normalized leftOperand being null.
      • Check if reference is null before checking if it resolves to null when replacing module attribute usages with their value because AtNonNumericOperations can have a null reference when they are non-referencing, like @spec.
    • #317 - Leave normal highlighting for char tokens when highlighting types - @KronicDeth
    • #320 - @KronicDeth
      • Stab operation parameter Use Scope is the stab operation.
      • Skip over PsiLeafElement when looking for variables because the PsiLeafElement is an error.
      • In a script file where the parent of a Match is a PsiFile, the Match Use Scope is the rest of the file.
      • Add = to Operator Signs
      • Skip NoParenthesesKeywords when highlighting types, which occurs when the :: has no proper right operand and the following one-liner function clause with do: is parsed as the right operand.
      • Skip DUMMY_BLOCK when looking for Variable, which prevents walking through errors.
      • Use Normalized pattern for Prefix, so that the operand is null when only the operator matches or the operand has errors.
      • Work-around Phoenix .ex templates that contain EEX: if <%= from EEX is detected, don't throw error when Modular can't be found.
      • Fix capitalization error in example text
    • #323 - Build jps-builder using only Java 1.6 compatible .classes - @KronicDeth
      • In IntelliJ 14.1, all of openapi.jar targets Java 1.6 (with MAJOR.MINOR 50.0), but in IntelliJ 2016.1, some of openapi.jar targets only Java 1.8 (with MAJOR.MINOR 52.0), since jps-builders require parts of openapi.jar and must target Java 1.6 even for IntelliJ 2016.1, the 52.0 .classes needed to be ported into org.elixir_lang.jps.builder, so that the 52.0 version in openapi.jar wouldn't be attempted to be loaded.

        This ended up being 5 classes:

        • ExecutionException
        • GeneralCommandLine
        • ParametersList
        • ParamsGroup
        • ProcessNotCreatedException

        Only GeneralCommandLine was used directly, all others are dependencies of it.

  • Incompatible Changes
    • #320 - @KronicDeth
      • Preferences > Editor > Colors & Fonts > Elixir restructured to group together related highlights and to match grouping used for Colors & Fonts > Language Defaults and Colors & Fonts > Java.
        • Documentation Module Attributes renamed to Module Attributes > Documentation
        • Documentation Text renamed to Module Attributes > Documentation > Text
        • Expression Substitution Mark renamed to Braces and Operators > Interpolation.
        • The following are now nested under Numbers instead of being at the top-level:
          • Binary, Decimal, Hexadecimal, and Octal Digits
          • Decimal Exponent, Mark and Separator
          • Invalid Binary, Decimal, Hexadecimal, and Octal Digits
          • Non-Decimal Base Prefix
          • Obsolete Non-Decimal Base Prefix
    • #322 - "Character List", "Escape Sequence", "Sigil", and "String" are moved under the new "Textual" group. - @KronicDeth
    • #324 - Group Numbers subcategories and lower display name verbosity - @KronicDeth
      • "Numbers > Binary, Decimal, Hexadecimal, and Octal Digits" renamed to "Numbers > Digits > Valid"
      • "Numbers > Invalid Binary, Decimal, Hexadecimal, and Octal Digits" renamed to "Numbers > Digits > Invalid"
      • "Numbers > Non-Decimal Base Prefix" renamed to "Numbers > Base Prefix > Non-Decimal"
      • "Numbers > Obsolete Non-Decimal Base" renamed to "Numbers > Base Prefix > Obsolete > Non-Decimal"

README Updates

Completion

Module Attributes

Module attributes declared earlier in the file can be completed whenever you type @ and some letter. If you want to see all module attributes, you can type @a, wait for the completions to appear, then delete the @ to remove the filtering to a.

Parameters and Variables

Parameter and variable usages can be completed whenever typing an identifier. The completions will include all variables know up from that part of the file. It can include variables from outside macros, like quote blocks.

Go To Declaration

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.

Parameters and Variables

  1. Place the cursor over a parameter or variable usage
  2. Active the Go To Declaration action with one of the following:
    a. Cmd+B
    b. Select Navigate > Declaration from the menu.
    c. Cmd+Click

If you hold Cmd and hover over the variable before clicking, it will say parameter or variable, which matches the annotation color.

Find Usage

Find Usage is a feature of JetBrains IDEs that allows you to find all the places a declared symbol, such a Module Alias
in a defmodule, is used, including in strings and comments.

Parameters and Variables

  1. Place cursor over the parameter or variable declaration.
  2. Active the Find Usage action with one of the following:
    a.
    i. Right-click the Alias
    ii. Select "Find Usages" from the context menu
    b. Select Edit > Find > Find Usages from the menu
    c. Alt+F7

Refactor

Rename

Parameters and Variables
  1. Place the cursor over the parameter or variable usage or declaration
  2. Active the Rename Refactoring action with one of the following:
    a.
    i. Right-click the module attribute
    ii. Select Refactoring from the context menu
    iii. Select "Rename..." from the Refactoring submenu
    b. Shift+F6
  3. Edit the name inline and have the declaration and usages update.
intellij-elixir - v3.0.1.20160531121901

Published by KronicDeth over 8 years ago

Canary build of the call-references branch built at 2016-05-31T12:19:01Z

intellij-elixir - v3.0.1.20160520213720

Published by KronicDeth over 8 years ago

Canary build of the call-references branch built at 2016-05-20T21:37:20Z

intellij-elixir - v3.0.1

Published by KronicDeth over 8 years ago

Thanks

  • Thanks to Khaaliq DeJan (@MisterDeejay) for reporting the AssertionError for Prefix#operator using the new error reporter.
  • Thanks to Iuri L. Machado (@imetallica), Andrei Dziahel (@develop7), and Ryan Scheel (@Havvy) for reporting the @NotNull violation for FindUsagesProvider#getType using the new error reporter.
  • Thanks to Tobias Pfeiffer (@PragTob) and Garrett Hart (@thirdshift) for prodding me to document what is a Kernel Function, Macro and Special Form so future users know which setting will highlight which calls.

Changelog

v3.0.1

  • Bug Fixes
    • #287 - Use the error reporter logger instead of plain assert in Prefix#operator. NOTE: This does not address error recovery recovery since I don't have a regression test case. - @KronicDeth
    • #283 - All function name elements act as PsiNameIdentifiers now even if they don't resolve, but that means they all need to support FindUsagesProvider#getType, which they don't, so use a placeholder of "unknown call type" for any Call that can't be matched and "unknown element" for anything else. - @KronicDeth
    • #284 - Enumerate all Kernel Functions, Macros, and Special Forms in the Syntax Highlighting section of the README, so that users searching for which category controls highlighting a given call can find it. - @KronicDeth

README Updates

Syntax Highlighting

Syntax highlighting for the following tokens:

  • Kernel Functions
    • abs
    • apply
    • apply
    • binary_part
    • bit_size
    • byte_size
    • div
    • elem
    • exit
    • function_exported?
    • get_and_update_in
    • get_in
    • hd
    • inspect
    • is_atom
    • is_binary
    • is_bitstring
    • is_boolean
    • is_float
    • is_function
    • is_function
    • is_integer
    • is_list
    • is_map
    • is_number
    • is_pid
    • is_port
    • is_reference
    • is_tuple
    • length
    • macro_exported?
    • make_ref
    • map_size
    • max
    • min
    • node
    • node
    • not
    • put_elem
    • put_in
    • rem
    • round
    • self
    • send
    • spawn
    • spawn
    • spawn_link
    • spawn_link
    • spawn_monitor
    • spawn_monitor
    • struct
    • throw
    • tl
    • trunc
    • tuple_size
    • update_in
  • Kernel Macros
    • @
    • alias!
    • and
    • binding
    • def
    • defdelegate
    • defexception
    • defimpl
    • defmacro
    • defmacrop
    • defmodule
    • defoverridable
    • defp
    • defprotocol
    • defstruct
    • destructure
    • get_and_update_in
    • if
    • in
    • is_nil
    • match?
    • or
    • put_in
    • raise
    • raise
    • reraise
    • reraise
    • sigil_C
    • sigil_R
    • sigil_S
    • sigil_W
    • sigil_c
    • sigil_r
    • sigil_s
    • sigil_w
    • to_char_list
    • to_string
    • unless
    • update_in
    • use
    • var!
  • Kernel.SpecialForms Macros
    • __CALLER__
    • __DIR__
    • __ENV__
    • __MODULE__
    • __aliases__
    • __block__
    • alias
    • case
    • cond
    • fn
    • for
    • import
    • quote
    • receive
    • require
    • super
    • try
    • unquote
    • unquote_splicing
intellij-elixir - v3.0.0

Published by KronicDeth over 8 years ago

Changelog

v3.0.0

  • Enhancements
    • #257 - @KronicDeth
      • Go To Symbol (⌥⌘O)
        • Call definition clauses (def, defp, defmacro, and defmacrop)
        • Callbacks (@callback and @macrocallback)
        • Call definition specifications (@spec)
        • Call definition heads (foo(bar)) for delegation (defdelegate foo(bar), to: BAZ)
        • Implementations (defimpl)
        • Protocols (defprotocol)
      • Go To Declaration for Aliases now uses the same isModular checks as the stubbing for the index uses for Go To Symbol.
    • #263 - Build against 14.0, 14.1, 15.0, and 2016.1 on travis-ci to ensure continued compatibility. - @KronicDeth
    • #273 - Error reporting for type highlighter gives the Class, Excerpt and Full Text when an unknown element type is encountered as the Excerpt alone is not enough sometimes. - @KronicDeth
    • #275 - @KronicDeth
      • Custom error handling that will open an issue against https://github.com/KronicDeth/intellij-elixir with the exception messsage and stacktrace filled in.
      • Changed NotImplementedExceptions and (some) asserts to logging custom error message that include the PsiElement text and the containing file as an attachment. The files make the URL too big for the error handler to put the file contents in when opening the browser with the error handler, so the issue body instead explains how to get the attachment text out of IntelliJ's "IDE Fatal Errors"
    • #276 - Update to Grammar Kit 1.3.0. - @KronicDeth
  • Bug Fixes
    • #256 - Fix Elixir Mix Run configuration not persisting past restart - @zyuyou
    • #259 - Allow Infix#operator to work on operations with errors, which eliminates the AssertionError reported when typing infix operation and they are incomplete - @KronicDeth
    • #259 - Add Keywords to the Preferences > Editor > Colors & Fonts > Elixir settings page, so it can be customized for just Elixir instead of having to change Preferences > Editor > Colors & Fonts > General > Keyword - @KronicDeth
    • #263 - Ensure compatibility from 14.0 to 2016.1 - @KronicDeth
      • Use TextAttributesKeys that aren't deprecated in 2016.1 and work back to 14.1

        All of CodeInsightColors is deprecated, so all constants from there had to be replaced. Unfortunately, the recommended replacements don't have the same color as the original, so I used different DefaultLanguageHighlighterColors constants for some.

        "Module Attribute" is now based on DefaultLanguageHighlighterColors.CONSTANT (which is purplish in Darcula) instead of the recommended METADATA, which is yellow. Although module attributes don't have to be constant since they can be set to accumulate, often they are used as constants and not really as metadata, since they are just data then. All the metadata uses of module attributes have a separate color.

        "Specification" is now based on DefaultLanguageHighlighterColors.FUNCTION_DECLARATION, which maintains the golden color that CodeInsightColors.METHOD_DECLARATION_ATTRIBUTES had.

        "Type" is now based on DefaultLanguageHighlighterColors.METADATA, which is bright yellow unlike CodeInsightColors.ANNOTATION_ATTRIBUTE_NAME_ATTRIBUTES, which was a bright white.

        "Type Parameter" is now based on DefaultLanguageHighlighterColors.PARAMETER, which unfortunately has no attributes associated with it, but the constant name was too good a fit not to use, so if you want the old color, you'll need to customize it yourself.

      • Restore compatibility with the IntelliJ IDEA 14.0 release line

        • By using reflection to call FileTemplateManager#getInstance if FileTemplateManager#getDefaultInstance is not available
        • By calling FileChooserDescriptorFactory#createSingleLocalFileDescriptor (which works in 14.0 through 2016.1) instead of FileChooserDescriptorFactory#createSingleFileDescriptor (which only works in 14.1 through 2016.1)
    • #264 - Use more human-readable error message for Elixir File action - @KronicDeth
      • Instead of showing the regular expression pattern, which may be confusing to new developers, explain in English the expected pattern. I also included the description, which explains how nesting is mapped to directories, of the action since it doesn't actually show up in the dialog otherwise.
    • #265 - Check if a file exists before allowing Elixir Module to be created. If it exists, show an error with the conflicting path. - @KronicDeth
    • #272 - Fix (one cause) of AssertionError in GoToSymbolContributor when the Modular (defimpl, demodule, defprotocol, and quote) could not be resolved due a def being surrounded by a for comprehension, which is common in Elixir libraries as was the case for Postgrex: any enclosing for comprehension(s) will now be ignored and the next enclosing macro will be checked to see if it is a Modular. - @KronicDeth
    • #273 - While typing, before : in keyword pairs, after the when, such as in @spec foo(id) :: id when id before finishing typing @spec foo(id) :: id when id: String.t, the keyword key will be properly highlighted as a Type Parameter - @KronicDeth
    • #276 - @KronicDeth
      • Properly handle the Infix#rightOperand being null due to the Pratt Parser matching up through the operator and then ignoring the mismatched right operand, which leads to the Infix having only 2 elements: the left operand and the operator.
      • @doc and other module attributes appearing as the right operand of @type name :: will be ignored as it is common when adding a new type above pre-existing, documented functions.
      • Only error in Infix#leftOperand if there are not 2-3 children for Infix instead of a strict 3.
  • Incompatible Changes
    • #276 - Drop support for IntelliJ 14.0 because the parser generated by Grammar Kit 1.3.0 is not compatible with the OpenAPI libraries shipped in IntelliJ 14.0. Still compatible with 14.1 through 2016.1. - @KronicDeth
intellij-elixir - v2.2.0

Published by KronicDeth over 8 years ago

Changelog

v2.2.0

  • Enhancement
    • #240 - Code Commenter - qertoip
    • #243, #248 - Structure View - KronicDeth
      • Controls
        • Scroll to Source and Scroll From Source
        • Sorting
          • Runtime (functions) vs Compile (macros)
          • Visibility (public [def, macro, etc] vs private [defp, macrop and @typep])
          • Alphabetical
        • Show Used - injects structure from use Alias call's __using__'s quote into the call site Structure
      • Elements
        • Callbacks (@callback) show their name/arity and then a nest spec
        • CallDefinition groups together CallDefinitionClause of the same name/arity
        • CallDefinitionClause (def, defp, macro, and macrop) shows the head of each definition under the CallDefinition.
        • CallDefinitionSpecification (@spec) show the type specification for a CallDefinition
        • CallReference name: arity shows the name/arity for a defoverridable.
        • Delegation shows all the :append_first and :to options with the implied Function Delegation nested underneath
        • Exception (defexception) show the implicit struct and nest any callback functions, such as exception/1 or message/1.
        • Overridable defoverridable tracks overridable functions and is used to mark CallDefinitions are overrides.
        • Quote quote do end models quote blocks so they can be injected use Alias sites.
        • Use use Alias show use calls.
    • #241 - Live Templates - pfitz
    • #220 - Added clarification to "Import Project from External Model" that mix.bat should be used instead of mix - f-lombardo
    • #244 - Get the Elixir version directly from System.build_info[:version] instead of processing the formatted output of elixir --version as the build info version is more stable - KronicDeth
  • Bug Fixes
    • #244 - Elixir version parsing handles both pre and build numbers if present by using the same regular expression as Elixir itself uses for the Version module - KronicDeth
    • #245 - Better error handling in Structure View - KronicDeth
intellij-elixir - v2.1.0

Published by KronicDeth almost 9 years ago

Changelog

v2.1.0

  • Enhancement
    • #236 - \u in strings and char lists for unicode mapping - KronicDeth
    • #237 - Test against Elixir 1.1.1 and 1.2.0 - KronicDeth
    • #233 - More flexible elixir --version parsing: works with elixir 1.2.0 and earlier - bitgamma
  • Bug Fixes
    • #231 - Update IntelliJ to 14.1.6 to fix 403 errors in Travis-CI build - sholden
intellij-elixir - v2.0.0

Published by KronicDeth almost 9 years ago

Changelog

v2.0.0

  • Enhancements
    • #207 - KronicDeth
      • Highlighters for
        • Kernel Functions
        • Kernel Macros
        • Kernel.SpecialForms Macros
    • #219 - Test against Elixir v1.1.1 - KronicDeth
    • #221 - Highlight after, catch, do, else, end, fn, and rescue as keywords - KronicDeth
    • #223, #227 - Annotate Module Attributes - KronicDeth
      • Documentation module attributes (@doc, @moduledoc, and @typedoc) are annotated as "Documentation Module Attributes" while all other module attributes are annotated as "Module Attributes".
      • The string or heredoc argument to a documentation module attribute (@doc, @moduledoc, and @typedoc) is annotated as "Documentation Text"
      • Function names passed to @callback, @macrocallback or @spec are annotated as "Specification".
      • Variables/calls in the parameters and return of @callback, @macrocallback, @spec are annotated as "Type".
      • Parameters of @opaque, @type, @typep names are annotated as "Type Parameter"
      • Keyword keys from the when clause of @callback, @macrocallback or @spec definitions and their usage are annotated as "Type Parameters"
      • @doc false, @moduledoc false, and @typedoc false will annotate the false with a weak warning: "Will make documented invisible to the documentation extraction tools like ExDoc.".
    • #228 - Module attributes resolution and refactoring - KronicDeth
      • Go To Definition for module attributes.
      • Module attribute completion (NOTE: works after typing first character after @. To see all module attributes, type a character after @, then delete the character to get the full list.)
      • Module attributes that can't be resolved will have "Unresolved module attribute" error annotation (i.e. red squiggly underline).
      • Find Usages of module attributes from their declarations.
      • Rename module attributes inline (editing the name in the declaration will change the name at the usage site at the same time without a dialog).
      • The module attribute value (from the declaration site) will be folded into the usage site. It can be reverted to the literal @module_name text by clicking the + to unfold.
  • Bug Fixes
    • #206 - Change "edition" to "addition" in README. - folz
    • #225 - Sped up reparsing when [ENTER] is hit in the middle of comment by removing the custom error handling element, adjacentExpression, and going with the default error handling provided by JetBrains' OpenAPI. - KronicDeth
    • #226 - Fix mix version detection on Windows - KronicDeth
  • Incompatible Changes
    • #225 - KronicDeth
      • Removed "Add Newline" Quick Fix as it depended on adjacentExpression elements, which have now been removed to speed up error handling when comments become code.
      • Removed "Add Semicolon" Quick Fix as it depended on adjacentExpression elements, which have now been removed to speed up error handling when comments become code.

Upgrading

v2.0.0

Preferences/Settings

The fallback key attribute is DefaultLanguageHighlighterColors.FUNCTION_CALL, which is uncolored in most themes, so users need to customize their themes to see the highlighting for "Kernel Functions", "Kernel Macros", and "Kernel.SpecialForms Macros".

Quick Fix

The "Add Newline" and "Add Semicolon" Quick Fixes have been removed as the parsing elements they depend on have been removed in favor of JetBrains' OpenAPI error handling. If your workflow depended on these quick fixes you will have to manually add newlines or semicolons now.

intellij-elixir - v1.2.1

Published by KronicDeth almost 9 years ago

Changelog

v1.2.1

  • Enhancements
    • #204 - Keywords not at the end of no parentheses calls will be properly marked as errors. - KronicDeth
  • Bug Fixes
    • #200 - Fix IllegalStateException for file delete and rename by giving ElixirFiles descriptive names for safe-refactoring displaying file usage. - KronicDeth
    • #201 - KronicDeth
      • README states explicitly that the plugin works with both IntelliJ Community and Ultimate.
      • README states that the plugin is free.
    • #202 - Prevent match error when typing ~ to start a sigil that is followed later by a \n by matching EOL in the NAMED_SIGIL state as a BAD_CHARACTER - KronicDeth
    • #204 - Keywords at the end of a no parentheses call that is surrounded by parentheses will not be marked as an error when that parenthetical group appears in the middle of an outer call. - KronicDeth
intellij-elixir - v1.2.0

Published by KronicDeth almost 9 years ago

Changelog

v1.2.0

  • Enhancements
    • #184 - If (1) you have intellij-erlang installed and (2) you have an atom in Erlang that starts with Elixir., such as 'Elixir.Test', then intellij-elixir will annotate whether it can resolve the name to a defmodule call in Elixir files. - KronicDeth
    • #188 - Default SDK path for Linux and Windows - zyuyou
    • #198 - KronicDeth
      • Go To Declaration (Cmd+Click, Cmd+B, Navigate > Declaration) from Alias to defmodule where Alias is declared.
      • Index defmodules for fast Go To Declaration in elixir-lang/elixir and other large projects.
      • Find Usage for Alias in defmodule
  • Bug Fixes
    • #187 - Fix links to screenshots in README - zhyu
intellij-elixir - v1.1.0

Published by KronicDeth about 9 years ago

Changelog

v1.1.0

  • Enhancements
    • #167 - zyuyou
      • Build
        • Compile an individual file
        • Make Project to build the entire project
      • New
        • Elixir File has new templates
          • Empty module
          • Elixir Application
          • Elixir Supervisor
          • Elixir GenServer
          • Elixir GenEvent
        • Project > Elixir creates a new Elixir project with an empty lib directory marked as source directory.
        • Project from Existing Sources...
          • Create project from existing sources sets up the project with SDK using a pre-existing directory.
          • Import project from external model > Mix
            • Fetches the the dependencies with the local version of mix
            • Marks lib directory as source
            • Marks test directory as test sources
      • Run > Elixir Mix to setup Run Configurations to run mix tasks.
intellij-elixir - v1.0.0

Published by KronicDeth about 9 years ago

Changelog

v1.0.0

  • Enhancements
    • #168 - Update ant build on travis-ci.org to use IDEA 14.1.4 (from 14.0.2) - KronicDeth
    • #174 - Parser is verified to quote the same as native Elixir - KronicDeth
  • Bug Fixes
    • #154 - Fix parsing of unary vs binary +/- with leading and trailing spaces and newlines - KronicDeth
    • #155 - Allow EOL between list arguments and ] - KronicDeth
    • #156 - KronicDeth
      • Relative identifiers after . that start with and, or, and not will be lexed as a single identifier instead
        of and, or, or not followed by another identifier.
      • end is allowed as a relative identifier after .
    • #157 - Fix (...) as part of matched expression in no parentheses stab signature - KronicDeth
    • #158 - Allow multiple newlines to mark the end of an expression, but only one ; - KronicDeth
    • #159 - Allow operators in function references (<op>/<arity>) for function captures (&<op>/<arity>) - KronicDeth
    • #160 - unquote_splicing is properly wrapped in __block__ when in stab bodies - KronicDeth
    • #163 - Check for matching terminator in heredocs when determining white space type at beginning of line - KronicDeth
    • #170 - Allow + to count as addition - KronicDeth
    • #171 - Unary expressions inside parentheses are no longer marked ambiguous_op: nil - KronicDeth
    • #173 - Differentiate between Qualifier.'relative'() vs Qualifier.'relative' () and Qualifier."relative"() vs Qualifier."relative" () - KronicDeth
    • #176 - Fix link to Elixir website in README - shalecraig
    • #178 - All tokens have human-readable names and/or expected characters for better error messages - KronicDeth
  • Incompatible Fixes
    • #162 - New Elixir File has moved to the last item in the New File menu to preserve CTRL+N ENTER keyboard shortcut for New > File - jaketrent
intellij-elixir - v0.3.5

Published by KronicDeth over 9 years ago

The parser is incomplete until v1.0.0. If you see
an odd error from valid Elixir code, check if it's a
known bug
that is planned to be fixed for v1.0.0. If you don't see your error, please
open a new issue. Please subscribe to notifications on
Issue #6 if you want to be notified when the parser is
complete.

Changelog

v0.3.5

  • Enhancements
    • #135 - do blocks (`do end) - @KronicDeth
    • #152 - Unmatched expressions (operations involving do block calls and normal matched expressions) - Kronicdeth
  • Bug Fixes
    • #137 - Lex full atom instead of just identifier-like operator prefix (:in<nospace>dex before vs :index after) - @KronicDeth
    • #138 - ! and not are properly wrapped in __block__s when in stab bodies - @KronicDeth