mirror of
https://github.com/haskell/ghcide.git
synced 2024-12-15 04:43:41 +03:00
79d712397b
* Added elisp to the readme * Changed the flags for compatibility with HIE * Change the default arguments to reflect hie compat
1.5 KiB
1.5 KiB
Haskell IDE Core
Our vision is that you should build an IDE by combining:
- hie-bios for determining where your files are, what the dependencies, what extensions are enabled etc.
haskell-ide-core
- this library - for defining how to type check, when to type check, and producing messages.haskell-lsp
for sending those messages to an LSP server.- A VS Code extension, e.g.
extension
in this directory.
There are more details in this blog post.
How to use it
Installing the binary
git clone https://github.com/digital-asset/daml.git
cd daml/compiler/haskell-ide-core
stack build
Using the VSCode extension
cd extension
npm install
code .
- Press F5 to start the extension.
- In the spawned extension, open the folder
haskell-ide-core
. - In the preferences, set the Haskell IDE Core executable preference to
stack
and the arguments toexec -- ide-demo --lsp .ghci
- Run the Reload Window command in VS Code.
Installing the VSCode extension permanently
cd compiler/haskell-ide-core/extension
vsce package
code --install-extension haskell-ide-core-0.0.1.vsix
Installing in emacs
- Install lsp and haskell-lsp
- Add this elisp to your .emacs.el
(require 'lsp)
(require 'lsp-haskell)
(require 'yasnippet)
(add-hook 'haskell-mode-hook #'lsp)
(setq lsp-haskell-process-path-hie "haskell-ide-core")
(setq lsp-haskell-process-args-hie '())