haskell / haskell/vscode-haskell

Support projects in subfolders

Abierto
#1,016 5 comentarios 2 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
TypeScript
Estrellas
597
Forks
98
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

**Is your feature request related to a problem? Please describe.**

I'm currently working on a project of which a Haskell project is only a small part. When trying to open the root folder in VSCode however, the Haskell extension does not pick up on the Stack project in the Haskell-specific subfolder.

**Describe the solution you'd like**

I would like the extension to select the Haskell project folder by looking for stack.yaml/*.cabal/whatever files, instead of just naively picking the opened folder as Haskell project folder.

This is also what Kate does, its LSP client default configuration has the following line for HLS:
`"rootIndicationFileNames": ["*.cabal", "stack.yaml", "cabal.project", "package.yaml"]`

**Describe alternatives you've considered**

- Just open the Haskell project in a separate VSCode window, and have two windows open (kind of annoying imo)
- Allow creating a file that instructs HLS where to actually find the project (a bit hacky, but would be a decent workaround)
- Open both toplevel and projects in a multi-root workspace

**Additional context**

Consider the following folder layout:
```
toplevel
| - project
| | - stack.yaml, project.cabal, src/, all other parts of a Haskell project
| - otherStuff
```

In my example, I open toplevel in VSCode (instead of project), but want HLS to use project as root folder.

So if I open the file `project/src/Main.hs`, I want HLS to start with `Directory: toplevel/project`, not `Directory: toplevel` which causes it to miss the stack/cabal files that allow it to know what dependencies I am using etc.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.