Technology moves fast! ⚡ Don't get left behind.🚶 Subscribe to our mailing list to keep up with latest and greatest in open source projects! 🏆

Subscribe to our mailing list


Atom package for PureScript build, completion, etc support

Subscribe to updates I use atom-ide-purescript

Statistics on atom-ide-purescript

Number of watchers on Github 108
Number of open issues 22
Average time to close an issue 14 days
Main language PureScript
Average time to merge a PR 2 days
Open pull requests 2+
Closed pull requests 6+
Last commit over 1 year ago
Repo Created almost 4 years ago
Repo Last Updated over 1 year ago
Size 1.49 MB
Organization / Authornwolverson
Latest Releasev0.18.0
Page Updated
Do you use atom-ide-purescript? Leave a review!
View open issues (22)
View atom-ide-purescript activity
View on github
Fresh, new opensource launches 🚀🚀🚀
Trendy new open source projects in your inbox! View examples

Subscribe to our mailing list

Evaluating atom-ide-purescript for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)

ide-purescript package for Atom

Build Status

This package provides editor support for PureScript projects in Atom, based on a Language Server which uses the purs compiler IDE server functionality, with UI provided via the atom-ide framework.

This package provides:

Package should trigger on opening a .purs file or running any PureScript/PSCI command from the menu bar or command palette.

Installation and General Use

For best results (and default settings) install dependencies:

  • purs (compiler) 0.8.5 or >= 0.9.1 (includes psc-ide-server/ ide server subcommand as standard)
    • 0.9.2 required for go-to definition, 0.9.x for some compiler suggestions
  • pulp >= 8.0.0 (appropriate for your psc version). >=10.0.0 recommended to use default build command

Required atom packages - these should be auto-installed by starting the package, eg by running any PureScript command.

For use with older versions of pulp, or for alternative build tools and configuration tips, see below. In brief the build command is configurable, but should output JSON errors.

IDE server

This package runs a langauge server process, which itself starts a compiler server process, purs ide server (previously psc-ide-server), to provide type information, completions,etc. This package will automatically start the IDE server in your project directory and kill it when closing, if for some reason you want a longer running server process you should be able to start that before starting atom.

For all functions provided by purs ide server you will need to build your project first! In particular a full build, not a fast-build on save, is required first time or after upgrading purs, afterwards saving individual files will update tooltips etc.


Provided from the IDE server. Make sure your project is built first. Only for top level definitions.

Completions will be sourced from all available modules by default; this is configurable to just those imported in the current file, in which case explicitly (re-)triggering the completion will expand to show all modules.

Imports will be inserted automatically for completions! Again this is configurable.


Hovering over an identifier will show a tooltip with its type (only for top level definitions):

Type tooltip

This is really stupid, and only cares that you hover over a word regardless of context, you will get some false positives.

Go to definitions

Hyperclick goto-definition functionality is supported. This is available with purs version 0.9.2 and above, and like tooltips/autocomplete works on identifiers bound at the top level. This is available as command/ctrl+click or cmd+alt/opt+enter by default, see atom-ide-ui config.

In case source positions are not up to date, they may not be updated on rebuild, try rebuilding or restarting psc-ide server.

Pursuit lookup

Pursuit lookup

Command available from the command palette:

  • PureScript search - search for identifiers, by identifier or type
  • PureScript search modules - find package by module
  • PureScript search - a local search of identifiers from built modules


PSCI window

Basic PSCI REPL integration (runs pulp psci). Comprises a read-only pane which displays PSCI output, and an input field to send expressions to the REPL (just hitting enter). Input can be sent from the current buffer by line or selection.

Command from the command palette:

  • PSCI: Open - open a PSCI buffer
  • PSCI: Send Line
  • PSCI: Send Selection


Build support is provided via pulp build by default, configurable to any command which will output psc errors. This can be configured to run on save, alternatively there is a 'PureScript Build' command.

As well as this there is fast rebuild via the IDE server on save (by default), this will build an individual file. The recommended approach is to run a full build initially and after any dependency upgrades, compiler updates, etc. or when producing build artifacts, and otherwise quick build for continuous error feedback.

Build configuration hints

The default build command is

pulp build -- --json-errors

(on windows pulp.cmd is called instead). Note This default requires pulp 0.10 as command syntax changed to require -- separator. This is configurable: the command should be on your PATH (or could be an explicit absolute path) with arguments, such that it will output JSON errors as per psc, on stderr. This is not interpreted via shell, simply pulled apart as a list of string separated arguments.

Some alternatives:

  • Pulp with psc-package: pulp --psc-package build -- --json-errors
  • Direct psc use: psc bower_components/purescript-*/src/**/*.purs src/**/*.purs --json-errors
  • Run a purescript-gulp based build: gulp - again need to ensure this outputs JSON errors, you probably want a specific task for this.
  • Pulp passing through psa: pulp build -- --stash --json-errors

    This will pass through psc errors as JSON but also integrate to any external psa stash, e.g. if you're running psa on a terminal somewhere. Right now the stashed warnings are not exposed in the JSON.

  • Ensure tests are compiled in the build: pulp build --include test -- --json-errors

  • Via npm run script: npm run -s build. Or if the run script does not output json errors you might be able to pass an extra flag: npm run -s build -- --json-errors - more information on this issue.

Since atom unfortunately does not support per-project configuration, the npm run script approach may be particularly useful where you have different projects that build differently. Alternatively you can look into the project-manager package.

You may be able to get away without thinking about all this if your project specific setup is only required for a full build (e.g. browserify step) and not just for the basic compilation stage.

Error Suggestions / Quick-Fix

Error suggestions

Error suggestions may be triggered from some underlined compiler warnings. There is no additional visual indication. A context menu can be triggered by 'alt-enter' (PureScript: Show Quick Fixes) when the cursor is on an eligible warning. Currently fixable warnings:

  • Unused or duplicate import (UnusedImport, DuplicateImport)
  • Extraneous identifiers in explicit import list (UnusedExplicitImport)
  • Implicit imports that should be made explicit - this will apply to all but remember that 1 open import is allowed without warning (ImplicitImport, ImplicitQualifiedImport, HidingImport)
  • Missing top level type declaration - add type signature. Note you will need to quantify any type variables that appear, and maybe re-qualify identifiers (MissingTypeDeclaration)
  • Inferred type for wildcard _ - fill in type signature. Notes as above. (WildcardInferredType)

Case split / add clause

Case split/add clause

  • Add clause (default binding: ^O c) - use psc-ide to add a clause to the current top-level function (from cursor on its type definition).
  • Case split (default binding: ^O s) - with cursor on an function argument identifier, add clauses to the definition to case-split on that argument.

Currently the type of the arguments must be provided by the user.

Hacking on atom-ide-purescript

After cloning, install dependencies psc-package update npm install

Bundle for Atom: npm run -s bundle

You can use the regular pulp build as part of your tooling or to see compile errors, but bundling is required for the plugin to be usable by Atom and will build the project as part of the task.

To use your local development version, you will first need to uninstall any current version you have installed. Then from within the atom-ide-purescript directory run apm link. This will create a symlink from the Atom plugins directory to your development directory.

atom-ide-purescript open issues Ask a question     (View All Issues)
  • over 2 years Could not connect to psc-ide-server message
  • over 2 years Autocomplete doesn't suggest all local identifiers
  • almost 3 years "Unknown module" for [bower installed] modules which are detected by pulp build -w
  • almost 3 years psc-ide-server processes not terminated on Windows
  • almost 3 years Autocomplete doesn't suggest names in import statement
  • almost 3 years [Feature Request] new keybinding to switch between Module.purs and Module.js
  • almost 3 years Censor warnings
  • almost 3 years Command to show type rather than needing to hover?
  • almost 3 years Add keywords to auto-completion list
  • almost 3 years Bug: type info broken
  • almost 3 years [suggestion] adding "rename module" and "add new module" functions
  • almost 3 years Issues with icons when using Atom Material
  • almost 3 years [bug] non-main modules sometimes do not update
  • almost 3 years [keybindings suggestion] no 'cmd-enter' overwriting + default 2-keys combo for most features + settings doc
  • almost 3 years [feature request] automatically suggest fix for missing imports
  • almost 3 years [sugestion] type tooltip henhancement: colors + clickable links + optionally stripped prefix + ...?
  • almost 3 years pursuit search problems: (function search hang, module search slow start, in both cases, no loading message, only a non descriptive hourglass)
  • almost 3 years [psci pane] adding history navigation with <up> and <down> key
  • almost 3 years buggy warning tooltips when several newlines
  • almost 3 years red underline doesn't appear when only once char is problematic
  • almost 3 years Autocompletion always uses fully qualified names
  • about 3 years Unexpected end of input error
  • about 3 years Always get Error for completion
  • about 3 years Uncaught TypeError: Cannot read property 'screenPositionForMouseEvent' of null
  • about 3 years Add a disable/toggle
atom-ide-purescript open pull requests (View All Pulls)
  • [WIP] Start multiple servers
  • 0.9 updates
atom-ide-purescript list of languages used
atom-ide-purescript latest release notes
v0.18.0 Grouped completions

Various configuration options on completion

  • Completion limit (requires purs version 0.11.5)
  • Grouped completions (requires purs version 0.11.6)

Completions are grouped to avoid listing each re-export. As often the re-exported version is the desired import (e.g. anything in Prelude and common pattern of re-exporting at the top level module), the follwoing strategies are used for picking the re-export to choose 1. Existing imports 2. User configuration of preferred modules (ordered list) 3. Re-export from a prefix named module (e.g. Foo.Bar.Baz reexported from Foo.Bar) shortest first 4. Original module (if none of the previous rules apply, there are no re-exports, or either grouping is disabled or compiler version does not support it)

v0.17.0 PureScript 0.11

The combined purs executable is now supported. For the initial transition period this is still optional, configured via the package settings, the default is still to use the old psc-ide-server. In time this default will be changed then the legacy support will be removed.

Note that the support for the npm bin folder lets you run with a mix of old and new-versioned projects.

v0.16.1 Linter 2.0

Update to Linter 2.0 API

screen shot 2017-04-08 at 20 13 12

This means fixes are now applied via Linter instead of a homebrew solution, via UI. The existing ide-purescript:show-quick-fixes command now redirects to intentions:show, and the existing binding should work - but you should update to using intentions directly. You can apply all suggestions via linter-ui-default:apply-all-solutions

Other projects in PureScript