elmjutsu

A bag of tricks for developing with Elm. (Autocompletion, Go To Definition, Find Usages, Rename Symbol, etc.)

halohalospecial

49,333

38

9.11.0

MIT

GitHub

This package consumes the following services:

Elmjutsu

A bag of tricks for developing with Elm.

https://atom.io/packages/elmjutsu

Setup

Features Overview

Note: Features marked with * are disabled by default. You may enable them in the Settings view.

Feature Details

This package parses your projects' source files to extract information, and downloads documentation of 3rd-party Elm packages. The downloaded documentation files will be saved to the path set in Cache Directory in the Settings view. If Cache Directory is blank, a temporary directory will be used. Take note that most operating systems delete temporary directories at bootup or at regular intervals.

Error Highlighting

error-highlighting

Always Compile Main

Elmjutsu: Set Main Paths

Sets the main paths of the project and saves them to elmjutsu-config.json.

Example:

{
  "mainPaths": ["Todo.elm", "Test.elm"]
}

The main paths are only relevant if Always Compile Main is enabled. See Always Compile Main.

Elmjutsu: Set Compile Output Path

Sets the output path of the project and saves it to elmjutsu-config.json. Defaults to "/dev/null" if not set.

Example:

{
  "outputPath": "main.js"
}

Report Warnings

Show Inferred Type Annotations

show-inferred-type-annotations

Compile With Debugger

Compile With Optimizations

Quick Fixes

quick-fix-replace-with

Elmjutsu: Quick Fix File

Autocomplete

This provides suggestions for imports, project symbols, and 3rd-party package symbols.

autocomplete

Global Autocomplete *

auto-import

Filtering suggestions

Autocomplete Snippets *

autocomplete-snippet

Special Completions ⚡

Press tab to go to the next tab stop (similar to how snippets work). Special completions can be disabled individually in the package settings.

construct-html-program

construct-basic

construct-case-of

construct-default-arguments

construct-default-value-for-type

construct-from-type-annotation-1

construct-from-type-annotation-2

construct-from-type-annotation-3

Type-Aware Autocomplete *

type-aware-autocomplete

Performance Tuning

Navigation

Datatips

Provides support for Datatips. The atom-ide-ui package should be installed for this to work.

datatips

Signature Help

Provides support for Signature Help. The atom-ide-ui package should be installed for this to work.

signature-help

Show Types in Tooltip *

This is disabled by default. To turn it on, check Show Types in Tooltip in the package settings. You can also change the placement of the tooltip (Types Tooltip Position).

show-types-in-tooltip

Elmjutsu: Toggle Sidekick

Shows the type hints and documentation for the symbol at cursor position. The size, position of the panel, and amount of information to show can be modified in the package settings.

sidekick1

sidekick3

sidekick2

Elmjutsu: Infer Type

Infer Types on the Fly *

infer-types-on-the-fly

Elmjutsu: Add Import

Quickly adds an import without scrolling to the top of the file. Also sorts the imports, removes duplicates, and removes defaults automatically.

add-import

Elmjutsu: Add Import As

Adds an alias to the added import (see Add Import).

Package Management

Hot Reloading

hot-reloading

Refactoring

Keybindings

Here is an example:

'atom-text-editor:not([mini])[data-grammar^="source elm"]':
  'f12': 'elmjutsu:go-to-definition'
  'ctrl-r': 'elmjutsu:go-to-symbol'
  'shift-f12': 'elmjutsu:find-usages'
  'f8': 'elmjutsu:go-to-next-usage'
  'shift-f8': 'elmjutsu:go-to-previous-usage'
  'ctrl-f12': 'elmjutsu:go-back'
  'alt-insert': 'elmjutsu:add-import'
  'f2': 'elmjutsu:rename-symbol'
  'alt-shift-l': 'elmjutsu:surround-with-let'
  'alt-l': 'elmjutsu:lift-to-let'
  'alt-t': 'elmjutsu:lift-to-top-level'
  'alt-i': 'elmjutsu:infer-type'
  'f6': 'diagnostics:show-actions-at-position'

'atom-workspace':
  'f1': 'elmjutsu:toggle-sidekick'
  'ctrl-shift-f12': 'elmjutsu:hide-usages-panel'
  'ctrl': 'linter-ui-default:expand-tooltip' # For linter and linter-ui-default users

Add them to your keymap.cson or bind them from Settings > Keybindings.

Notes

Credits