Haskell Language Server 2.6.0.0 is now available

These two are very good improvements!

4 Likes

Do semantic tokens correspond to the Semantic Highlight of VSCode?

Yes, it provides the semantic tokens for semantic highlighting.

Yes, it does indeed (20 character posting limit defeated).

This is mega exciting! I see Cabal 3.11+ isn’t officially released yet. If we want to use this work is it enough to install cabal-install from source (the binary), or do I need to build haskell-language-server with a source-repository-package entry (so compiling HLS against a newer version of Cabal-the-library)?

2 Likes

You don’t need to recompile HLS, just install a recent enough version of the cabal-install binary.

I look forward to the bug reports :slight_smile:

4 Likes

Does it being a “plugin” mean it is opt-in, or are semantic tokens used by default?

Normally plugins are enabled by default, this one is currently disabled by default (you should be able to turn it on via your editor config once the client plugins get updated). It’s disabled because a) it’s new and came in just before the release, so we’re not totally sure how stable it is, and b) full semantic tokens is… a lot, and it’s unclear if it should ever be the default.

2 Likes

ghcup install cabal --force -u https://github.com/haskell/cabal/releases/download/cabal-head/cabal-head-Linux-x86_64.tar.gz head (with variants for x86_64 macOS and x86_64 Windows here: Release cabal-head · haskell/cabal · GitHub)

1 Like

Thanks, but I don’t use ghcup (I use Haskell.nix). Hopefully this helps others though!

1 Like

It is the way now HLS organize its development and provide features. A lot of plugins.
You can enable or disable plugins as you desire.
And semantic tokens is still in very beta state(active development and bug fix). Welcome to helping us test it out.

When do you think cabal install -w ghc-9.8 haskell-language-server will be properly supported from main Hackage?

(I had missed this release announce, didn’t surface in my discourse notifications…)

We’re basically blocked by our remaining allow-newers, which you can see here: https://github.com/haskell/haskell-language-server/blob/master/cabal.project#L91

1 Like

In fact, I see we got a release of commutative-semigroups, and the ekg stuff isn’t on by default, so it might now actually work!

Am I reading the blame correctly that those bumps have been around for two months? That seems like an excessively long time for simple bounds extensions. Perhaps those packages should get more maintainers?

1 Like

That would be nice :slight_smile: generally we are in a bit of an awkward situation with HLS where our dependency set is a bit higher than we would like, and we often have to do some prodding. Probably we should also try to cut down!

1 Like

I see @andreasabel has made a Hackage revision, so ekg-core should be good to go now too.

Sadly the text bound wasn’t bumped and we still have the primitive-extras issue, it seems.

That’s not enough if any package in your dependencies has build-type: Custom. As figured out by @TeofilC, adding the following to your cabal.project helps:

allow-newer: 
  *:Cabal,
  *:Cabal-syntax

source-repository-package
    type: git
    location: https://github.com/haskell/cabal.git
    subdir: Cabal

source-repository-package
    type: git
    location: https://github.com/haskell/cabal.git
    subdir: Cabal-syntax
4 Likes

Thanks with a revision of primitive-unlifted, I could finally build with ghc-9.8 now!

My Fedora copr repo is now updated to 2.6 and includes builds for fedora ghc9.8 for the first time.

4 Likes