# Resolved: Missing HLS features in Emacs?

**URL:** <https://discourse.haskell.org/t/resolved-missing-hls-features-in-emacs/8660>\
**Category:** Learn\
**Created:** [January 27, 2024, 9:06pm UTC](https://discourse.haskell.org/t/resolved-missing-hls-features-in-emacs/8660 "2024-01-27T21:06:45Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomjaguarpaw](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/tomjaguarpaw/32/1230_2.png) [@tomjaguarpaw](https://discourse.haskell.org/u/tomjaguarpaw)\
**Post date:** [January 27, 2024, 9:06pm UTC](https://discourse.haskell.org/t/resolved-missing-hls-features-in-emacs/8660/1 "2024-01-27T21:06:45Z")

</div>

I use HLS in Emacs and I’m trying to understand where some features that I used to use have gone. I don’t know if HLS has removed those features or if Emacs has stopped giving me access to them. The features are

- When a name is not in scope, offer to import it from a module it is defined in (even if that module is not yet imported). I think the set of modules it considered was all modules in all packages that the current project depends on.
- Fill a typed hole with an expression of a matching type.

I used to access the features through `C-c /` (`lsp-execute-code-action`). Now I just get unhelpful options, such as “defer errors about missing names” (which I definitely _don’t_ want). Maybe hole fits [were disabled a long time ago](https://github.com/haskell/haskell-language-server/blob/master/ChangeLog.md#130)? Or maybe not, because I see “Wingman tactics” as an enabled plugin under `customize-group` of `lsp-haskell-plugins`.  
It’s also possible I’ve got a too old version of the `lsp-haskell` mode for Emacs (I’m on `3249cde` from one year one month ago). But I don’t know. I’m just confused.

Can anyone shed any light?

---

<div class="post-metadata">

**Author:** ![tomjaguarpaw](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/tomjaguarpaw/32/1230_2.png) [@tomjaguarpaw](https://discourse.haskell.org/u/tomjaguarpaw)\
**Post date:** [January 27, 2024, 9:32pm UTC](https://discourse.haskell.org/t/resolved-missing-hls-features-in-emacs/8660/2 "2024-01-27T21:32:41Z")

</div>

Oh, and I should probably say that I don’t know which HLS version was the one that worked, because although I have ` '(lsp-haskell-server-path "haskell-language-server-wrapper-2.4.0.0")` in my `.emacs` configuration file, `lsp-mode` doesn’t actually seem to honor that. It just seems to load whatever version of HLS has been set as default in `ghcup`. I’ve also tried 2.5 and 2.6 and neither of them seem to support the missing features either. It’s possible that when they worked I was using a _really_ old version of HLS, like 1.7, but I’ve deleted it now to free up disk space for the newer ones, so I can’t confirm …

---

<div class="post-metadata">

**Author:** ![theGhostJW](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/theghostjw/32/1302_2.png) [@theGhostJW](https://discourse.haskell.org/u/theGhostJW)\
**Post date:** [January 27, 2024, 9:51pm UTC](https://discourse.haskell.org/t/resolved-missing-hls-features-in-emacs/8660/3 "2024-01-27T21:51:08Z")

</div>

perhaps related to this? It seems some plugins aren’t supported yet with 2.6.0.0 / GHC 9.8.

> <https://github.com/haskell/haskell-language-server/issues/4012>
>
> \### Your environment
> 
> \*\*Which OS do you use?\*\*
> Ubuntu (Windows WSL)
> 
> \*\*Whic…h version of GHC do you use and how did you install it?\*\*
> cabal: 3.10.2.1
> ghc: 9.8.1
> 
> \*\*Which LSP client (editor/plugin) do you use?\*\*
> vscode-haskell
> 
> \*\*Which version of HLS do you use and how did you install it?\*\*
> 2.6.0.0 via ghcUp
> 
> \*\*Have you configured HLS in any way (especially: a \`hie.yaml\` file)?\*\*
> No
> 
> \### Summary
> 
> Previously, when there is a hint or error, quick fix options have been provided in VSCode (e.g. to use a correct variable name or update imports), and these could be applied automatically by selecting one of those options. 
> 
> Now the only options provided are either to turn off the error via a pragma or copilot related fixes. I have tried disabling copilot and confirmed this does not fix the issue. Also, the suggested code action is provided in the hint.
> 
> I have double checked my HLS options selected in VS code and all the related code action / plugin options are checked.
> 
> \### Steps to reproduce
> 
> 1. slightly change a variable name to be incorrect
> 2. hover over the error
> 3. =\> note the suggested fix:
> 
> !\[image\](https://github.com/haskell/haskell-language-server/assets/3053204/0eca1634-f5aa-4035-8aee-530594f28580)
>     
> 4. invoke Quick Fix
> 5. =\> no related fix option is given
> 
> !\[image\](https://github.com/haskell/haskell-language-server/assets/3053204/f7d09b7e-433a-4b7c-bdce-6c341e079036)
> 
> \### Expected behaviour
> 
> Fix option should be provided

---

<div class="post-metadata">

**Author:** ![tomjaguarpaw](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/tomjaguarpaw/32/1230_2.png) [@tomjaguarpaw](https://discourse.haskell.org/u/tomjaguarpaw)\
**Post date:** [January 27, 2024, 9:54pm UTC](https://discourse.haskell.org/t/resolved-missing-hls-features-in-emacs/8660/4 "2024-01-27T21:54:31Z")

</div>

That’s indeed the same problem I’m seeing, but it happens on 2.4 and 2.5 as well, not just 2.6, so I think something else must be happening.

---

<div class="post-metadata">

**Author:** ![tomjaguarpaw](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/tomjaguarpaw/32/1230_2.png) [@tomjaguarpaw](https://discourse.haskell.org/u/tomjaguarpaw)\
**Post date:** [January 27, 2024, 9:57pm UTC](https://discourse.haskell.org/t/resolved-missing-hls-features-in-emacs/8660/5 "2024-01-27T21:57:16Z")

</div>

Ah, but the problem is to do with GHC 9.8, not the HLS version. When I use 9.4 the actions are available. Thanks for that info @theGhostJW!

---

<div class="post-metadata">

**Author:** ![ReleaseCandidate](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/releasecandidate/32/2849_2.png) [@ReleaseCandidate](https://discourse.haskell.org/u/ReleaseCandidate)\
**Post date:** [January 28, 2024, 5:13am UTC](https://discourse.haskell.org/t/resolved-missing-hls-features-in-emacs/8660/6 "2024-01-28T05:13:56Z")

</div>

These two tables contain the relevant information, but you need to select the version of HLS that you are using  
[https://haskell-language-server.readthedocs.io/en/2.6.0.0/support/ghc-version-support.html#](https://haskell-language-server.readthedocs.io/en/2.6.0.0/support/ghc-version-support.html#)  
[https://haskell-language-server.readthedocs.io/en/2.6.0.0/support/plugin-support.html#](https://haskell-language-server.readthedocs.io/en/2.6.0.0/support/plugin-support.html#)

---

<div class="post-metadata">

**Author:** ![tomjaguarpaw](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/tomjaguarpaw/32/1230_2.png) [@tomjaguarpaw](https://discourse.haskell.org/u/tomjaguarpaw)\
**Post date:** [January 28, 2024, 9:05am UTC](https://discourse.haskell.org/t/resolved-missing-hls-features-in-emacs/8660/7 "2024-01-28T09:05:16Z")

</div>

Thanks, that’s very useful!
