Skip to content

Latest commit

 

History

History
79 lines (54 loc) · 3.34 KB

README.org

File metadata and controls

79 lines (54 loc) · 3.34 KB

Nix Builds of Haskell Language Server (HLS)

https://github.com/shajra/nix-haskell-hls/workflows/CI/badge.svg

About this project

This project has a Nix expression for the Haskell Language Server (HLS).

The Haskell Language Server is the latest attempt make an IDE-like experience for the Haskell programming language. HLS implements Microsoft’s Language Server Protocol (LSP). With this approach, a background service is launched for a either a Stack or Cabal project that answers questions needed by an editor for common IDE features (code navigation, completion, documentation, refactoring, etc.). There’s a variety of editors supporting LSP that can take advantage of such a server.

The Nix expression provided by this project builds the latest version of HLS targeting a variety of GHC compilers. Additionally, this project’s continuous integration (using GitHub Actions) caches built packages at Cachix, a service for caching pre-built Nix packages. If you don’t want to wait for a full local build when first using this project, setting up Cachix is recommended.

See the provided documentation on Nix for more on what Nix is, why we’re motivated to use it, and how to get set up with it for this project.

Prior Art

Prior initiatives to accomplish this, GHCIDE and Haskell IDE Engine (HIE), have joined forces behind HLS, so there’s some expectation that HLS will subsume these projects in the future.

For both GHCIDE and HIE, there are respective projects maintaining Cachix-cached Nix builds/expressions. GHCIDE has ghcide-nix and HIE has all-hies. This project provides something similar for HLS.

Note that you need a version of HLS compiled specifically for the GHC compiler used by your project. If you have multiple versions of GHC and HLS installed in your path, then a provided wrapper can be used to select the right one for the version of GHC used by your project. HLS personal laptops (one NixOS, another MacOS). Later on it may have packages for more machines. For now, the expression evaluates to an attribute set of package derivations. The package sets are different depending on the detected operating system.

Using the project

Installing Haskell Language Server

TODO

Release

The “master” branch of the repository on GitHub has the latest released version of this code. There is currently no commitment to either forward or backward compatibility.

“user/shajra” branches are personal branches that may be force-pushed to. The “master” branch should not experience force-pushes and is recommended for general use.

License

All files in this “nix-haskell-hls” project are licensed under the terms of the MIT License.

Please see the ./COPYING.md file for more details.

Contribution

Feel free to file issues and submit pull requests with GitHub.

There is only one author to date, so the following copyright covers all files in this project:

Copyright © 2020 Sukant Hajra