nwolverson / psc-ide

(WIP) Editor Support for the PureScript programming language

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

psc-ide

A tool which provides editor support for the PureScript language.

Build Status

Compatibility Warning

psc-ide versions up to 0.3.0 are compatible with purescript versions < 0.7.5.

psc-ide versions from 0.4.0 and onwards are only compatible with purescript >= 0.7.5.

Installation

Compiled binaries are provided for Windows, Ubuntu and OSX on the release page. It is however very easy to build psc-ide with stack or cabal.

After you installed the psc-ide binaries you can start using one of the editor plugins.

Using stack

stack install psc-ide

Using cabal

For building with cabal the use of sandboxes is highly recommended to avoid "cabal hell"

mkdir psc-ide
cd psc-ide
cabal update
cabal sandbox init
cabal install psc-ide

And then copy the compiled binaries from .cabal-sandbox/bin/ into a folder on your path.

From Source

For the most recent version of psc-ide you can compile from master doing:

git clone https://github.com/kRITZCREEK/psc-ide.git
cd psc-ide
stack install

Editor Integration

Running the Server

Start the server by running the psc-ide-server executable. It supports the following options:

  • -p / --port specify a port. Defaults to 4242
  • -d / --directory specify the toplevel directory of your project. Defaults to the current directory
  • --output-directory: Specify where to look for compiled output inside your project directory. Defaults to output/, relative to either the current directory or the directory specified by -d.
  • --debug: Enables some logging meant for debugging

Issuing queries

After you started the server you can start issuing requests using psc-ide. Make sure you start by loading the modules before you try to query them.

psc-ide expects the build externs.purs inside the output/ folder of your project after running pulp build or psc-make respectively.

(If you changed the port of the server you can change the port for psc-ide by using the -p option accordingly)

Protocol

For a documentation have a look at: PROTOCOL.md

Installing and Building

The project is set up to be built using the stack tool.

cd psc-ide
stack setup # This is only required if you haven't installed GHC 7.10.2 before
stack build # add --copy-bins to also copy the compiled binaries to ~/.local/bin/
stack exec -- psc-ide-server &
stack exec -- psc-ide

Testing

The testsuite can be run with stack test. If you make changes to the tests stack won't notice them so you need to do stack clean && stack install to rebuild the tests.

About

(WIP) Editor Support for the PureScript programming language

License:MIT License


Languages

Language:Haskell 99.3%Language:Emacs Lisp 0.7%