Skip to content

Releases: haskell/haskell-language-server

0.6.0

11 Nov 09:46
372a12e
Compare
Choose a tag to compare

0.6.0 includes two brand new plugins!

  • Hlint Plugin: it integrates hlint diagnostics and lets you apply suggestions to fix them.

hls-hlint-demo

  • Module Name Plugin: it makes easier create new modules and modify them, suggesting the appropiate module name as a code lens.

module-name-demo

This release also includes many improvements and bug fixes for the tactic plugin (see pull requests authored by @isovector for more details).

We have updated two essential tools used by the ide:

  • implicit-hie: to fix a bug present when loading cabal based projects with executables containing other-modules

  • ghcide: the ide uses the just released version 0.5 with many bug fixes and improvements, including:

    • code action to remove all redundant imports
    • improved support for Template Haskell
    • emit desugarer warnings

Pull requests merged

0.5.1

11 Oct 17:37
Compare
Choose a tag to compare

0.5.1 is a minor bug fix release, mainly fixing an issue with the eval plugin as well as upgrading the ormolu and stylish-haskell dependencies.

Pull requests merged

0.5.0

04 Oct 16:11
Compare
Choose a tag to compare

0.5.0 comes with a new tactics plugin which provides case splitting, homomorphic case splitting, and lambda introduction:

Case splitting

It can even attempt to fully fill a hole!

Attempt to fill in hole code action

The imports lens plugin also learnt a new code action to make all imports explicit:

Explicit imports code action

In the absence of an explicit hie.yaml file, implicit-hie-cradle is now used to generate a cradle.

There's also plenty of bug fixes, improvements and updates to the underlying tools, including Fourmolu and ghcide. Some of the improvements from ghcide include:

  • The entire project is typechecked on load
  • Reverse dependencies of a module are typechecked upon saving
  • Code completion includes local terms
  • Import code actions now also suggest open imports
  • Documentation on hover shows for symbols defined in the same module

If you're eager to try all this out, haskell-language-server is now also installable via ghcup:

$ ghcup install hls

Pull requests merged

0.4.0

03 Sep 20:03
0a18edd
Compare
Choose a tag to compare

0.4.0 introduces the import lens plugin, which can convert your import statements into qualified imports, or into an explicit import list:

Imports code lens

The eval plugin has also learnt two new commands, :type and :kind:

{-# LANGUAGE TypeApplications #-}
foo :: Show a => a -> String
foo = show

-- >>> :type foo @Int
-- foo @Int :: Int -> String

-- >>> :type +v foo @Int
-- foo @Int :: Show Int => Int -> String
-- >>> type N = 1
-- >>> type M = 40
-- >>> :kind N + M + 1
-- N + M + 1 :: Nat

-- >>> type N = 1
-- >>> type M = 40
-- >>> :kind N + M + 1
-- N + M + 1 :: Nat

There is now also support for GHC 8.10.2, and a new haskell-language-server --probe-tools command to help debug what version of each tool HLS is using.

$ haskell-language-server --probe-tools
haskell-language-server version: 0.3.0.0 (GHC: 8.10.1) (PATH: /Users/luke/.cabal/store/ghc-8.10.1/hskll-lngg-srvr-0.3.0.0-7c6d48c3/bin/haskell-language-server)
Tool versions found on the $PATH
cabal:		3.2.0.0
stack:		2.3.3
ghc:		8.10.2

Pull requests merged

0.3.0

09 Aug 17:52
Compare
Choose a tag to compare

0.3.0 comes with two new plugins, retrie and fourmolu, provides binaries for GHC 8.8.4, and comes with a host of bug fixes.

The retrie plugin supports RULES, functions and type synonyms which can be accessed through contextual code actions.

retrie in action

Fourmolu can be used to format your code by setting the haskell.formattingProvider field in your LSP configuration to

{
  "haskell": {
    "formattingProvider": "fourmolu"
  }
}

The Brittany formatter is now also available on GHC 8.10.1.

Pull requests merged

0.2.2

28 Jul 15:59
Compare
Choose a tag to compare

This changes the configuration section from "languageServerHaskell" to "haskell"
to align it with vscode-haskell-1.0.0. Whilst the old section is still
supported for now, you should update your LSP configuration (which varies per
client) from

{
  "languageServerHaskell": {
    "formattingProvider": "stylish-haskell"
  }
}

to

{
  "haskell": {
    "formattingProvider": "stylish-haskell"
  }
}

Pull requests merged

  • Mention docs on hover feature in README
    (#209 by @georgefst)
  • Add static binaries for ghc-8.8.4
    (#224 by @bubba)
  • Rename the configuration section from languageServerHaskell => haskell
    (#227 by @bubba)
  • Use -haddock for cabal and stack
    (#214 by @jneira)
  • slightly better shell.nix for local development
    (#235 by @pepeiborra)
  • Shell nix further steps
    (#240 by @pepeiborra)
  • Add numeric-version option for wrapper and server
    (#241 by @fendor)
  • Accept the legacy "languageServerHaskell" config name
    (#243 by @bubba)
  • Fix for Eval plugin: Error from tests not reported
    (#244 by @tittoassini)
  • Rename binaries before uploading
    (#248 by @bubba)

0.2.1

22 Jul 13:57
Compare
Choose a tag to compare

This release includes a new eval plugin that allows Haddock code examples to be evaluated through a code lens. For example, the code below will now offer to evaluate intercalate " " example, and will insert the output in the line below.

example :: [String]
example = ["This is an example", "of", "interactive", "evaluation"]

-- >>> intercalate " " example
-- "This is an example of interactive evaluation"
--

Eval plugin

This is also the first release to have binaries distributed alongside it. Some behind the scene changes include the GHC library directory now being obtained on the fly, so either ghc, cabal or stack will need to be present on your PATH depending on your project. See docs/releases.md for more information. If you find any issues with this, please let us know! The binaries should be available to download from this release.

Pull requests merged

0.2

06 Jul 07:31
7ad18cf
Compare
Choose a tag to compare
0.2

0.1

03 May 16:06
019b028
Compare
Choose a tag to compare
0.1

In this version

  • cabal to 2020-05-02T10:11:15Z
  • stack-8.8.3 to lts-15.10
  • stack to nightly-2020-05-01

Changes

This is the initial version, so too many to list individually.

The key point is that is now supports multi-component cradles, and has been in
daily use by the developers for some time.

It still does not have feature parity with haskell-ide-engine, but it is
currently useful.