Presence of a .git directory breaks Haskell Language Server

I see, that would make sense. Eglot seems to think the project directory is parent, not project. And when I remove the .git file, eglot seems to think the project directory is project/app, not project. Thank you, I think that identifies the problem. I thought it had to do with HLS, not eglot, mostly because HLS could still find some packages.

It seems like this question runs into the same issue.

Looks like there are two suggestions there that will work, adding a cabal.project file at the same level as the .git file, or setting the project-vc-extra-root-markers variable. The second one worked for me.