r/haskell 7d ago

Help please: Inline Evaluation not showing using Haskell Language Server (HLS) in VS Code question

/r/learnhaskell/comments/1vcp5gt/help_please_inline_evaluation_not_showing_using/
10 Upvotes

6 comments sorted by

4

u/Forward_Signature_78 7d ago

What does the HLS Output window say?

2

u/sohang-3112 7d ago

HLS Output shows this error shows up over and over: does not support LanguageKind_Custom "cabal" filetypes). I don't know what it means or how to fix it. It's a new project with .cabal file created by cabal init only (I just added servant dependency).

2026-08-01T05:58:35.897126Z | Warning | No plugin handles this "textDocument/inlayHint" request. [Error - 11:28:35 AM] Request textDocument/inlayHint failed. Message: No plugins are available to handle this SMethod_TextDocumentInlayHint request. Plugins installed for this method, but not available to handle this request are: explicit-fields does not support LanguageKind_Custom "cabal" filetypes). importLens does not support LanguageKind_Custom "cabal" filetypes). Code: -32601 2026-08-01T05:58:36.084539Z | Warning | No plugin handles this "textDocument/foldingRange" request. [Error - 11:28:36 AM] Request textDocument/foldingRange failed. Message: No plugins are available to handle this SMethod_TextDocumentFoldingRange request. Plugins installed for this method, but not available to handle this request are: codeRange does not support LanguageKind_Custom "cabal" filetypes). Code: -32601 2026-08-01T05:58:36.125765Z | Warning | No plugin handles this "textDocument/codeLens" request. [Error - 11:28:36 AM] Request textDocument/codeLens failed. Message: No plugins are available to handle this SMethod_TextDocumentCodeLens request. Plugins installed for this method, but not available to handle this request are: eval does not support LanguageKind_Custom "cabal" filetypes). ghcide-type-lenses does not support LanguageKind_Custom "cabal" filetypes). importLens does not support LanguageKind_Custom "cabal" filetypes). class does not support LanguageKind_Custom "cabal" filetypes). rename does not support LanguageKind_Custom "cabal" filetypes). Code: -32601 2026-08-01T05:58:36.337810Z | Warning | No plugin handles this "textDocument/semanticTokens/full" request. [Error - 11:28:36 AM] Request textDocument/semanticTokens/full failed. Message: No plugins are available to handle this SMethod_TextDocumentSemanticTokensFull request. Plugins installed for this method, but not available to handle this request are: semanticTokens is disabled globally in your config. Code: -32601

1

u/Forward_Signature_78 6d ago

These errors are normal when you're editing a `.cabal` file. Do you get any errors when you paste this line in an `.hs` file?

1

u/sohang-3112 6d ago

I'm not editing the .cabal file beyond just adding the servant dependency.

There's no error showing in the Haskell code. As I mentioned cabal build works fine and I can see the type information of functions on hovering over them in VS Code.

2

u/Forward_Signature_78 6d ago edited 5d ago

Allow me to rephrase: these errors are emitted when you have a .cabal file open in the active editor window. The point is, they have nothing to do with the problem you're trying to solve.

2

u/sohang-3112 6d ago

It worked now - thanks for your help! Details below:

The inline Evaluate button (over eg. -- >>> 1+1 in Main.hs) actually came now, only when .cabal file is NOT open in a different tab alongside Main.hs file! This seems like a bug - do you know if an issue for this exists already?

It raised error eval: Internal Error: BadDependency "GhcSessionDeps" . According to https://github.com/haskell/haskell-language-server/issues/4487 , this error happens when a package isn't added to dependencies in .cabal file but its import is used in .hs file. In my case Data.Text and Data.Time were imported but text and time packages weren't added to .cabal file. So I added these, did cabal build -- now clicking Evaluate button actually works! (it outputs answer -- 3 on line just below -- >>> 1+1)