ecosystem/Editor-and-tool-support.md
The PureScript ecosystem contains a number of editor plugins and tools to help you build libraries and applications. The set of available tools is growing continuously, but this documentation contains popular, stable tools that you can use today.
At minimum, almost all projects will use:
These tools can be installed via NPM, among other installation methods.
At the moment of writing, Spago is going through a period of transition from an older to a new codebase. Consider the following characteristics of each:
Spago
Spago legacy
purescript/spago repository while actually having Spago legacy and its API in mindNote that both versions are extensively documented in their respective repositories, consult these if you face any issues. Spago rewrite offers automatic ways of migration from Spago legacy-driven projects.
The PureScript compiler includes an IDE server, purs ide, to supply tooling for editors. This server has been used to implement a PureScript language server, which implements the Language Server Protocol for PureScript. Major editor tooling either uses purs ide server directly or via the language server.
Most editor plugins which rely on PureScript's IDE tooling have at least these features:
Some tools are commonly used with several editors, as they are implemented to be editor-agnostic:
To generate TAGS files, use purs docs --format etags (or --format ctags).
.purs files.purs ide.purs ide..purs files.Spacemacs users can use the PureScript layer.
purs ide, syntax highlighting for .purs files, and much more.purs ide and syntax highlighting for .purs files.purs ide..purs files..purs files.There are many tools available to help you develop libraries and applications in PureScript. These include build tools, package managers, code formatters, dead code elimination tools, GitHub Actions, Nix tools, and more.
There are several build tools and package managers available for PureScript.
These build tools are maintained, but are no longer recommended for most projects (use Spago instead):
There are some tools meant specifically for Nix users, who may not be able to use installation methods like NPM.
purs), spago, pscid, zephyr, and more for Nix environments.PureScript projects which use alternate backends may use tools from the ecosystem of the target language. This documentation is a non-exhaustive starting point for some tools you may find useful when working with particular backends for PureScript.
PureScript projects which target JavaScript may find some tools from the JavaScript ecosystem. PureScript code which imports libraries from JavaScript will at least require a JavaScript package manager (to install dependencies) and a JavaScript bundling tool (to resolve JavaScript imports, among other things). You may also want to use a linter for any JavaScript code you are writing via the FFI.
spago bundle command, which uses esbuild. Other popular bundlers include webpack with the purs-loader PureScript loader, and parcel.These tools were previously mentioned in this documentation, but are no longer maintained or recommended:
nvm for Node) for PureScript compiler versions.