Table of Contents generated with DocToc
- Elixir plugin
- Features
- Project
- Project Structure
- Project Settings
- Module Settings
- New Elixir File
- Syntax Highlighting and Semantic Annotation
- Grammar parsing
- Inspections
- Quick Fixes
- Code Folding
- Commenter
- Delimiters
- Building/Compiling
- Live Templates
- Run Configurations
- Completion
- Go To Declaration
- Go To Symbol
- Find Usage
- Refactor
- Structure
- Installation
- Inside IDE using JetBrains repository
- Inside IDE using Github releases
- Screenshots
- Error reporting
- Donations
- Public Donors
Elixir plugin
This is a plugin that adds support for Elixir to JetBrains IntelliJ IDEA platform IDEs (0xDBE, AppCode, IntelliJ IDEA, PHPStorm, PyCharm, Rubymine, WebStorm).
It works with the free, open source Community edition of IntelliJ IDEA in addition to the paid JetBrains IDEs like Ultimate edition of IntelliJ. No feature is locked to a the paid version of the IDEs, but the plugin works best in IntelliJ because only IntelliJ supports projects with different languages than the default (Java for IntelliJ, Ruby for Rubymine, etc).
The plugin itself is free. Once you have your IDE of choice installed, you can install this plugin
Features
Project
NOTE: This feature only works in IntelliJ IDEA as it depends on an extension point unavailable in language-specific IDEs, like Rubymine.
New
If you want to create a basic (non-mix
) Elixir project with a lib
directory, perform the following steps.
- File > New > Project
- Select Elixir from the project type menu on the left
- Click Next
- Select a Project SDK directory by clicking Configure.
- Select a Project SDK directory by clicking Configure.
- The plugin will automatically find the newest version of Elixir installed. (NOTE: SDK detection only works for Linux, homebrew installs on OSX, and Windows. Open an issue with information about Elixir install locations on your operating system and package manager to have SDK detection added for it.)
- If the automatic detection doesn't find your Elixir SDK or you want to use an older version, manually select select
the directory above the
bin
directory containingelixir
,elixirc
,iex
, andmix
. - Click Next after you select SDK name from the Project SDK list.
- Change the
Project name
to the name your want for the project - (Optionally) change the
Project location
if the directory does not match what you want - (Optionally) expand
More Settings
to change theModule name
,Content root
,Module file location
, and/orProject format
. The defaults derived from theProject name
andProject location
should work for most projects. - Click Finish
- Choose whether to open in a New Window or in This Window.
From Existing Sources
Create project from existing sources
If you've already created a (non-mix
) project, you can load it as an Elixir project into the plugin.
- File > New > Project From Existing Sources...
- Select the root directory of your project.
- Leave the default selection, "Create project from existing sources"
- Click Next
- Project name will be filled with the basename of the root directory. Customize it if you like.
- Project location will be the root directory.
- Click Next.
- If you previously opened the directory in IntelliJ or another JetBrains IDE, you'll be prompted to overwrite the .idea directory. Click Yes.
- You'll be prompted with a list of detected Elixir project roots to add to the project. Each root contains a
mix.exs
. Uncheck any project roots that you don't want added. - Click Next.
- Select a Project SDK directory by clicking Configure.
- The plugin will automatically find the newest version of Elixir installed. (NOTE: SDK detection only works for Linux, homebrew installs on OSX, and Windows. Open an issue with information about Elixir install locations on your operating system and package manager to have SDK detection added for it.)
- If the automatic detection doesn't find your Elixir SDK or you want to use an older version, manually select select
the directory above the
bin
directory containingelixir
,elixirc
,iex
, andmix
. - Click Next after you select SDK name from the Project SDK list.
- Click Finish on the framework page. (No framework detection is implemented yet for Elixir.)
- Choose whether to open in a New Window or in This Window.
Import project from external model
If you've already created a mix
project, you can load it as an Elixir project into the plugin.
- File > New > Project From Existing Sources...
- Select the root directory of your project.
- Select "Import project from external model"
- Select Mix
- Click Next
- The "Mix project root" will be filled in with the selected directory.
- (Optional) Uncheck "Fetch dependencies with mix" if you don't want to run
mix deps.get
when importing the project - Ensure the correct "Mix Path" is detected. On Windows, the
mix.bat
, such asC:\Program Files (x86)\Elixir\bin\mix.bat
should be used instead of themix
file without the extension. - Ensure the "Mix Version" is as expected. The number in parentheses should match the Elixir version.
- Click Next
- All directories with
mix.exs
files will be selected as "Mix projects to import". To import just the main project and not its dependencies, click Unselect All. - Check the box next to the project root to use only its
mix.exs
. (It will likely be the first checkbox at the top.) - Click Next
- Select a Project SDK directory by clicking Configure.
- The plugin will automatically find the newest version of Elixir installed. (NOTE: SDK detection only works for Linux, homebrew installs on OSX, and Windows. Open an issue with information about Elixir install locations on your operating system and package manager to have SDK detection added for it.)
- If the automatic detection doesn't find your Elixir SDK or you want to use an older version, manually select select
the directory above the
bin
directory containingelixir
,elixirc
,iex
, andmix
. (On Windows it is the directory containingelixir.bat
,elixirc.bat
,iex.bat
, andmix.bat
.) - Click Finish after you select SDK name from the Project SDK list.
Project Structure
- Excluded
_build
(Output frommix
)rel
(Output fromexrm
)
- Sources
lib
- Test Sources
test
Project Settings
The Project Settings include
- Project Name
- Project SDK
Module Settings
Sources
The Module Settings include Marking directories as
- Excluded
- Sources
- Tests
Paths
Module paths list the output directories when compiling code in the module. There is a an "Output path" for dev
MIX_ENV
and "Test output path" for the test
MIX_ENV
.
Dependencies
Module dependencies are currently just the SDK and the sources for the module. Dependencies in deps
are not
automatically detected at this time.
New Elixir File
- Right-click a directory (such as
lib
ortest
in the standardmix new
layout) - Select New > Elixir File.
- Enter an Alias for the Module name, such as
MyModule
orMyNamespace.MyModule
. - Select a Kind of Elixir File to use a different template.
Empty module
An underscored file will be created in an underscored directory lib/my_namespace/my_module.ex
) with the given module
name with be created:
defmodule MyNamespace.MyModule do
@moduledoc false
end
Elixir Application
An underscored file will be created in an underscored directory lib/my_namespace/my_module.ex
) with the given module
name with be created. It will have a start/2
function that calls MyNamespace.MyModule.Supervisor.start_link/0
.
defmodule MyNamespace.MyModule do
@moduledoc false
use Application
def start(_type, _args) do
MyNamespace.MyModule.Supervisor.start_link()
end
end
Elixir Supervisor
An underscored file will be created in an underscored directory lib/my_namespace/my_module.ex
) with the given module
name with be created. It will have a start_link/1
function that calls Supervisor.start_link/0
and init/1
that sets
up the child specs. It assumes a MyWorker
child that should be supervised :one_for_one
.
defmodule MyNamespace.MyModule.Supervisor do
@moduledoc false
use Supervisor
def start_link(arg) do
Supervisor.start_link(__MODULE__, arg)
end
def init(arg) do
children = [
worker(MyWorker, [arg], restart: :temporary)
]
supervise(children, strategy: :one_for_one)
end
end
Elixir GenServer
An underscored file will be created in an underscored directory lib/my_namespace/my_module.ex
) with the given module
name with be created. It will have a start_link/2
function that calls GenServer.start_link/3
and the minimal
callback implementations for init/1
, handle_call/3
, and handle_cast/2
.
The Elixir use GenServer
supplies these callbacks, so this template is for when you want to change the callbacks, but
would like the stubs to get started without having to look them up in the documentation.
defmodule MyNamespace.MyModule do
@moduledoc false
use GenServer
def start_link(state, opts) do
GenServer.start_link(__MODULE__, state, opts)
end
def init(_opts) do
{:ok, %{}}
end
def handle_call(_msg, _from, state) do
{:reply, :ok, state}
end
def handle_cast(_msg, state) do
{:noreply, state}
end
end
Elixir GenEvent
An underscored file will be created in an underscored directory lib/my_namespace/my_module.ex
) with the given module
name with be created. The minimal callback implementations for init/1
, handle_event/2
, and handle_call/2
,
handle_info/2
.
The Elixir use GenEvent
supplies these callbacks, so this template is for when you want to change the callbacks, but
would like the stubs to get started without having to look them up in the documentation.
defmodule MyNamespace.MyModule do
@moduledoc false
use GenEvent
# Callbacks
def init(_opts) do
{:ok, %{}}
end
def handle_event(_msg, state) do
{:ok, state}
end
def handle_call(_msg, state) do
{:ok, :ok, state}
end
def handle_info(_msg, state) do
{:ok, state}
end
end
Syntax Highlighting and Semantic Annotation
Syntax highlighting of lexer tokens and semantic annotating of parser elements can be customized in in the Color Settings page for Elixir (Preferences > Editor > Color & Fonts > Elixir).
Text Attribute Key Display Name | Tokens/Elements | Scheme | |||
---|---|---|---|---|---|
Default | Darcula | ||||
Alias | String |
![]() |
![]() |
||
Atom |
|
![]() |
![]() |
||
Braces and Operators | Bit |
|
![]() |
![]() |
|
Braces and Operators | Braces |
|
![]() |
![]() |
|
Braces and Operators | Brackets |
|
![]() |
![]() |
|
Braces and Operators | Character Token | ? |
![]() |
![]() |
|
Braces and Operators | Comma | , |
![]() |
![]() |
|
Braces and Operators | Dot | . |
![]() |
![]() |
|
Braces and Operators | Interpolation |
|
![]() |
![]() |
|
Braces and Operators | Maps and Structs | Maps |
|
![]() |
![]() |
Braces and Operators | Maps and Structs | Maps |
|
![]() |
![]() |
Braces and Operators | Operation Sign |
|
![]() |
![]() |
|
Braces and Operators | Parentheses |
|
![]() |
![]() |
|
Braces and Operators | Semicolon | ; |
![]() |
![]() |
|
Calls | Function | inspect |
![]() |
![]() |
|
Calls | Macro | inspect |
![]() |
![]() |
|
Calls | Predefined |
|
![]() |
![]() |
|
Comment | # Numbers |
![]() |
![]() |
||
Keywords | end |
![]() |
![]() |
||
Module Attributes | @custom_attr |
![]() |
![]() |
||
Module Attributes | Documentation | @doc |
![]() |
![]() |
|
Module Attributes | Documentation | Text | Simple module docstring |
![]() |
![]() |
Module Attributes | Types | Callback | func |
![]() |
![]() |
Module Attributes | Types | Specification | func |
![]() |
![]() |
Module Attributes | Types | Type | parameterized |
![]() |
![]() |
Module Attributes | Types | Type Parameter | type_parameter |
![]() |
![]() |
Numbers | Base Prefix | Non-Decimal |
|
![]() |
![]() |
Numbers | Base Prefix | Obsolete Non-Decimal |
|
![]() |
![]() |
Numbers | Decimal Exponent, Mark, and Separator |
|
![]() |
![]() |
|
Numbers | Digits | Invalid |
|
![]() |
![]() |
Numbers | Digits | Valid |
|
![]() |
![]() |
Textual | Character List |
'This is a list'
|
![]() |
![]() |
|
Textual | Escape Sequence |
\x{12}
|
![]() |
![]() |
|
Textual | Sigil |
|
![]() |
![]() |
|
Textual | String |
"Hello world"
|
![]() |
![]() |
|
Variables | Ignored |
_
|
![]() |
![]() |
|
Variables | Parameter |
|
![]() |
![]() |
|
Variables | Variable |
pid
|
![]() |
![]() |
Grammar parsing
Built on top of highlighted tokens above, the parser understands the following parts of Elixir grammar as valid or allows the grammar because they contain correctable errors:
- Empty Parentheses (
()
) - Keyword Lists
- Keyword Keys - Aliases, identifiers, quotes, or operators when followed immediately by a colon and horizontal or vertical space.
- Keyword Values - Empty parentheses (
()
) and matched expressions.
- Matched Expressions,
in other words, unary and binary operations on variable, function, and macro names and values (numbers, strings,
char lists, sigils, heredocs,
true
,false
, andnil
). - No Parentheses expressions, which
are function calls with neither parentheses nor
do
blocks that have either (1) a positional argument and keyword arguments OR (2) two or more positional arguments with optional keyword arguments. - Anonymous function calls
.()
with either no arguments; a no parentheses arguments expression as an argument; keywords as an argument; positional argument(s); or positional arguments followed by keywords as arguments. - Remote function calls (
Alias.function
,:atom.function
, etc) and local function calls (function
) with...- No Parentheses with...
- No Arguments (
Alias.function
) - Keywords (
Alias.function key: value
) - Nested No Parentheses Call (
Alias.function Inner.function positional, key: value
) - Positional and Keyword arguments (
Alias.function positional, key: value
) - Matched Expression (
Alias.function 1 + 2
) - Parentheses with...
- No arguments (
Alias.function()
) - No Parentheses Call (
Alias.function(Inner.function positional, key: value
) - Keywords (
Alias.function(key: value)
) - Positional and Keyword arguments (
Alias.function(positional, key: value)
) - Trailing parentheses for quoting (
def unquote(variable)(positional)
)
- Bracket expression (
variable[key]
) - Block expressions (
function do end
) - Unmatched expressions, in other words combinations of block expressions and matched expressions.
Inspections
Inspections mark sections of code with warnings and errors. They can be customized from the Preferences > Inspections > Elixir.
Ambiguous nested calls
Detects when compiler will throw unexpected comma. Parentheses are required to solve ambiguity in nested calls
.
Function calls with multiple arguments without parentheses cannot take as arguments functions with multiple arguments
without parentheses because which functional gets which arguments is unclear as in the following example:
outer_function first_outer_argument,
# second argument is another function call without parentheses, but with multiple arguments
inner_function first_inner_argument,
ambiguous_keyword_key: ambiguous_keyword_value
To fix the ambiguity if first_inner_keyword_key: first_inner_keyword_value
should be associated, add parentheses
around the inner function's arguments:
# keywords are for inner function
outer_function first_outer_argument
inner_function(
first_inner_argument
ambiguous_keyword_key: ambiguous_keyword_value
)
# keywords are for outer function
outer_function first_outer_argument
inner_function(
first_inner_argument
),
ambiguous_keyword_key: ambiguous_keyword_value



Ambiguous parentheses
Detects when compiler will throw unexpected parenthesis. If you are making a function call, do not insert spaces in between the function name and the opening parentheses
.
Function calls with space between the function name and the parentheses cannot distinguish between function calls with
parentheses, but with an accidental space before the (
and function calls without parentheses where the first
positional argument is in parentheses.
Empty Parentheses
function ()
To fix the ambiguity remove the space or add outer parentheses without the space if the first argument should be ()
:
# extra space, no arguments to function
function()
# first argument is `()`
function(())
Keywords in Parentheses
function (key: value)
Keywords inside parentheses is not valid, so the only way to fix this is to remove the space
function(key: value)
Positional arguments in Parentheses
function (first_positional, second_positional)
A list of positional arguments in parenthenses is not valid, so the only way to fix this is to remove the space
function(first_positional, second_positional)



Keywords appear before the end of list.
one.(
one,
two positional, key: value,
three
)
Keywords can only appear at the end of an argument list, so either surround the no parentheses expression argument with parentheses, or move the the keywords to the end of the list if it wasn't meant to be a no parentheses expression.
one.(
one
two(positional, key: value),
three
)
OR
one.(
one,
two,
three,
key: value
)



Quick Fixes
Quick Fixes are actions IntelliJ can take to change your code to correct errors (accessed with Alt+Enter by default).
Remove space in front of ambiguous parentheses
If a set of parentheses is marked as ambiguous then the space before it can be removed to disambiguate the parentheses with Alt+Enter. (Will vary based on keymap.)

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
- Position cursor between lines with with downward facing - arrow and upward facing - arrow.
- Cmd+-
Expanding
- Position cursor on the collapsed line with the square +
- 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 |
Commenter
You can comment or uncomment the current line or selected block of source. By selecting a block of source first you can quickly comment out and entire function if you're trying to track down a compiling or testing error that's not giving a helpful line number.
Using the menus
- Highlight one or more lines
- Comment (or Uncomment) with one of the following:
a. Code > Comment with Line Comment
b. On OSX the key binding is normally
Cmd+/
.
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 |
[ |
] |
{ |
} |
( |
) |
' |
' |
''' |
''' |
" |
" |
""" |
""" |
<< |
>> |
< |
> |
/ |
/ |
| |
| |
Building/Compiling
Settings
- Compile project with mix (use
mix compile
instead ofelixirc
directly) - Attach docs (don't use
--no-docs
elixirc
flag) - Attach debug info (don't use
--no-debug-info
elixirc
flag) - Ignore module conflict (use
--ignore-module-conflict
elixirc
flag)
Individual File
- Have a file selected in Project view with the Project view in focus OR have an Editor tab in focus
- Build > Compile 'FILE_NAME'
- Build results will be shown
- If compilation is successful, you'll see "Compilation completed successfully" in the Event Log
- If compilation had errors, you'll see "Compilation completed with N errors and M warnings" in the Event Log and
the Messages Compile tab will open showing a list of Errors
Project
- Build > Make Project
- Build results will be shown
- If compilation is successful, you'll see "Compilation completed successfully" in the Event Log
- If compilation had errors, you'll see "Compilation completed with N errors and M warnings" in the Event Log and
the Messages Compile tab will open showing a list of Errors
Live Templates
Live Templates are snippets of code that can be inserted quickly and have placeholder locations that the cursor will automatically jump to when using the template. Whenever you start typing, Live Templates will start matching against the shortcuts. A template can be selected with Tab.
Live Templates can be customized in Preferences > Editor > Live Templates > Elixir.
Shortcut | Code |
---|---|
@doc
|
|
case
|
|
cond
|
|
def
|
|
def,
|
|
defi
|
|
defm
|
|
defmac
|
|
defmacp
|
|
defover
|
|
defp
|
|
defpro
|
|
defs
|
|
do
|
|
doc
|
|
fn
|
|
for
|
|
if
|
|
ife
|
|
ii
|
|
mdoc
|
|
rec
|
|
test
|
|
try
|
|
Run Configurations
Mix Tasks
Much like rake
tasks in Rubymine, this plugin can run mix
tasks.
- Run > Edit Configurations...
- Click +
- Select "Elixir Mix"
- Fill in the "Name" for the Run Configuration
- Fill in the command (
mix
task) to run - Click "OK" to save the Run Configuration and close the dialog
- Click the Run arrow in the Toolbar to run the
mix
task - The Run pane will open, showing the results of the
mix
task.- If there is an error with a FILE:LINE stack frame, it will be a clickable link that will take you to that location
- If there is an error with a FILE:LINE stack frame, it will be a clickable link that will take you to that location
Completion
Aliases and Modules
When you start typing an Alias, completion will look in three locations:
alias
aliased names in the current file a.Suffix
foralias Prefix.Suffix
b.MultipleAliasA
orMultipleAliasB
foralias Prefix.{MultipleAliasA, MultipleAliasB}
c.As
foralias Prefix.Suffix, as: As
- Indexed module names (as available from Go To Symbol)
a.
Prefix.Suffix
fromdefmodule Prefix.Suffix
b.MyProtocol
fromdefprotocol MyProtocol
c.MyProtocol.MyStruct
i.defimpl MyProtocol, for: MyStruct
ii.defimpl MyProtocol
nested underdefmodule MyStruct
- Nested modules under aliased names
a.
Suffix.Nested
foralias Prefix.Suffix
wherePrefix.Suffix.Nested
is an indexed module, implementation or protocol name. b.MultipleAliasA.Nested
foralias Prefix.{MultipleAliasA, MultipleAliasB}
wherePrefix.MultipleAliasA.Nested
alias Prefix.{MultipleAliasA, MultipleAliasB}
is an indexed module, implementation or protocol name. c.As.Nested
foralias Prefix.Suffix, as: As
wherePrefix.Suffix.Nested
is an indexed module, implementation, or protocol name.
Aliases inside { }
When you start typing inside { }
for alias Prefix.{}
or import Prefix.{}
, completion will look for nested modules under Prefix
and then remove the Prefix.
, so completion will look like Suffix
.
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.
Alias
- Place the cursor over an Alias with an aliased name setup by
alias
a.Suffix
ifalias Prefix.Suffix
called b.MultipleAliasA
ifalias Prefix.{MultipleAliasA, MultipleAliasB}
called c.As
ifalias Prefix.Suffix, as: As
- Activate the Go To Declaration action with one of the following:
a.
Cmd+B
b. Select Navigate > Declaration from the menu. c.Cmd+Click
- A Go To Declaration lookup menu will appear, allowing you to jump either the
alias
that setup the aliased name or jumping directly todefmodule
of the unaliased name. Select which declaration you want a. Use arrow keys to select and hitEnter
b.Click
Module
- Place the cursor over a fully-qualified Alias
a.
A.B
inA.B.func()
b.A.B
inalias A.B
c.B
inalias A.{B, C}
- Activate 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 Alias before clicking, the target declaration will be shown.
Module Attribute
- Place the cursor over a
@module_attribute
- Activate 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 @module_attribute
before clicking, the target declaration will be shown.
Parameters and Variables
- Place the cursor over a parameter or variable usage
- 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.
Go To Symbol
Go To Symbol is a way to search for any of the following by name:
- Call definition clauses (
def
,defp
,defmacro
, anddefmacrop
) - Callbacks (
@callback
and@macrocallback
) - Call definition specifications (
@spec
) - Call definition heads (
foo(bar)
) for delegation (defdelegate foo(bar), to: BAZ
) - Implementations (
defimpl
) - Protocols (
defprotocol
)
You can bring up Go To Symbol with the keyboard shortcut (⌥⌘O on OSX) or using the menus (Navigate > Symbol...).
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.
Module
- Place cursor over an
defmodule
Alias. - Activate 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
Module Attribute
- Place cursor over the
@module_attribute
part of the declaration@module_attribute value
. - Activate the Find Usage action with one of the following:
a.
i. Right-click the module attribute
ii. Select "Find Usages" from the context menu
b. Select Edit > Find > Find Usages from the menu
c.
Alt+F7
Parameters and Variables
- Place cursor over the parameter or variable declaration.
- 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
Module Attribute
- Place the cursor over the
@module_attribute
usage or declaration. - 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
- Edit the name inline and have the declaration and usages update.
Parameters and Variables
- Place the cursor over the parameter or variable usage or declaration
- 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
- Edit the name inline and have the declaration and usages update.
Structure
You can view the structure of the currently open editor tab using the Structure tool window.
Viewing Structure
- View > Tool Windows > Structure
- Click the Structure Button (normally in the left tool buttons)
- If you can't see the Tool Buttons, they can be enabled with View > Tool Buttons
Cmd+7
Buttons
The buttons in the Structure tool are broken into 4 categories:
Sorters
Icon | Tooltip | Description |
---|---|---|
![]() |
Sort by Time |
When the defined callable is usable:
|
![]() |
Sort by Visibility |
Whether the element visible outside its defining module:
|
![]() |
Sort Alphabetically | Sort by name |
NOTE: When any combination of sorters is turned on, they are sorted from left to right (as shown in the button bar), so with all 3 sorters on, the elements are first grouped by Time, then inside each Time group, they are sorted by Visibility, then in each Visibility group, they are sorted by name.
Providers
The providers add nodes not in the text of the file, but that will appear in the compiled Module.
Icon | Tooltip | Description |
---|---|---|
![]() |
Show Used |
In Modules that `use |
Expanders
The expanders expand or collapse all the elements in the Structure tool window.
Icon | Tooltip | Description |
---|---|---|
![]() |
Expand All | Expand All Elements in the Structure tool window |
Related RepositoriesFiraCodeMonospaced font with programming ligatures ... awesome-graphqlAwesome list of GraphQL & Relay ... awesome-cheatsheet:beers: awesome cheatsheet ... awesome-elmA curated list of useful Elm tutorials, libraries and software. Inspired by awes ... code-screenshotsСкриншоты редакторов кода разных разработчиков ... Top ContributorsReleases |