haskell / haskell/vscode-haskell
Support projects in subfolders
- 主要语言
- TypeScript
- 星标
- 597
- 派生
- 98
- PR 合并指标
- 30 天内没有已合并 PR
描述
**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.
贡献指南
评估
这个 Issue 还没有评估数据。