This package provides the following services:
This package consumes the following services:
Atom plugin for HIE LSP server
Rudimentary support for HIE, relies on atom-ide-ui for displaying LSP interactions, and language-haskell to identify Haskell files. Internatlly uses atom-languageclient for the LSP client, and HIE as the LSP server.
To get hie to automatically detect the correct hie version to use based on your projects GHC version, enable the experimental flag 'Use hie-wrapper', and make sure to build your project using the Makefile in the HIE repository (builds multiple versions of hie).
Installation
You can install ide-haskell-hie
by using apm
.
apm install ide-haskell-hie
Or via Atom > Settings view > Install Packages > Search packages > ide-haskell-hie
From source
To contribute to ide-haskell-hie
you might want to install it from source:
# Get source from `ide-haskell-hie` repository
git clone git@github.com:Tehnix/ide-haskell-hie.git
cd ide-haskell-hie
# install dependencies
npm install
# link local version in `dev` mode
apm link --dev
# start Atom in `dev` mode
atom --dev
# To unlink local version of `ide-haskell-hie` run
apm unlink --dev
For more information about apm
and link
check Contributing to Official Atom Packages.
Configuration
The plugin should work out-the-box, but your environment may differ for many reasons, and the following are some configurations that might help you get it working.
Absolute path to hie executable
will set the path to hie, in case it's not on your $PATH.Use hie wrapper
makes Atom use thehie-wrapper.sh
file to start hie through. This does assume that you built the hie executable usingmake build
, but will fall back to plainhie
.Use custom hie wrapper
enables you to use your own custom hie wrapper script, if the standard one doesn't suit your need (e.g. to use with nix).The path to your custom hie wrapper
specifies the path to the custom wrapper, and is required for it to take effect.Turn on debugging output
passes the--debug
flag to hie (although not if using a custom wrapper, then you're on your own).Log to a file (if debugging is on)
will set the log file that debug writes to.
For additional debugging (e.g. stderr), you can enable Settings -> Core -> Debug L S P
or add debugLSP: true
to the core section in Debug -> Config... -> config.cson
, and then view the output in the Atom Developer Console.
A few screenshots of the working things
Type/Datatips information on hover & Definitions/Hyperclick
Linter/diagnostics on save
Outline view & Highlighting
Code actions
Code format
No screenshot really necessary here.
Not implemented
- Find references (HIE does not support this yet, see issue #361)
- Rename (HIE supports it, but atom-languageclient is TBD, see issue #13)
Miscellaneous
The code for the providers that HIE supports can be found here (permanent link here).