Skip to content

Multi Cradle: No prefixes matched when editing Setup.hs #3710

@k355l3r-5yndr0m3

Description

@k355l3r-5yndr0m3

Your environment

Arch Linux
Cabal
Neovim (lsp-config)

Steps to reproduce

  1. Create new project
  2. Change build-type to Custom
build-type:         Custom
custom-setup
  setup-depends:
    base,
    Cabal
  1. Create a Setup.hs file and build
  2. Open Setup.hs

Expected behaviour

hls works seamlessly on Setup.hs

Actual behaviour

hls output this error

Multi Cradle: No prefixes matched
pwd: /home/cha0s/testing
filepath: /home/cha0s/testing/Setup.hs
prefixes:
("app/Main.hs",Cabal {component = Just "testing:exe:testing"})

Debug information

I found this reddit post describing something similar but Stack is used instead.
The custom build script Setup.hs is the only file affected, the other seems to work fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    build tool: cabalbuild tool: stacktype: 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