Skip to content

Request textDocument/semanticTokens/full failed. #4889

@Abbath

Description

@Abbath

Semantic tokens don't work for some of my projects. I don't use stack as in #4583. They work for my other projects.

Your environment

Which OS do you use?

Windows 11

Which version of GHC do you use and how did you install it?

9.6.7 from ghcup

How is your project built (alternative: link to the project)?

https://github.com/Abbath/Calculator

Which LSP client (editor/plugin) do you use?

nvim + nvim-lspconfig, VS Code + Haskell plugin

Which version of HLS do you use and how did you install it?

2.13.0.0 from various sources (ghcup, Mason)

Have you configured HLS in any way (especially: a hie.yaml file)?

Semantic tokens are on in neovim/VS Code config. hie.yaml is available in the repo:

cradle:
    multi:
    - path: "dist-newstyle"
      config: { cradle: { none:  } }
    - path: "./Calculator"
      config: 
        cradle:
          cabal:
            - path: "./Calculator/src"
              component: "lib:Calculator"
            - path: "./Calculator/src-exe"
              component: "exe:Calculator"
            - path: "./Calculator/src-test"
              component: "test:Test"

Steps to reproduce

Open this file in the editor https://github.com/Abbath/Calculator/blob/master/Calculator/src/Calculator.hs

Expected behaviour

Semantic tokens work

Actual behaviour

Semantic tokens do not work

Debug information

2026-04-07T22:05:19.110837Z | Warning | semanticTokens: no HieAst exist for fileNormalizedFilePath "C:\\Code\\Calculator\\Calculator\\src\\Calculator.hs"
[Error - 12:05:19 AM] Request textDocument/semanticTokens/full failed.
  Message: semanticTokens: Rule Failed: GetSemanticTokens
  Code: -32803 

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: semantic-tokenstype: bugSomething isn't right: doesn't work as intended, documentation is missing/outdated, etc..

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions