Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add roots for haskell in default languages.toml #2952

Closed
0rphee opened this issue Jul 4, 2022 · 2 comments
Closed

Add roots for haskell in default languages.toml #2952

0rphee opened this issue Jul 4, 2022 · 2 comments
Labels
C-enhancement Category: Improvements

Comments

@0rphee
Copy link
Contributor

0rphee commented Jul 4, 2022

Describe your feature request

So, while trying to load a Haskell stack project with helix, I found that the lsp couldn't find imports from external libraries, nevertheless, borrowing a line from the haskell-language-server configuration for kakoune has fixed the problem. I think it would be nice to add this to the default languages.tom for a better out-of-box experience.

Current configuration for haskell

[[language]]
name = "haskell"
scope = "source.haskell"
injection-regex = "haskell"
file-types = ["hs"]
roots = []
comment-token = "--"
language-server = { command = "haskell-language-server-wrapper", args = ["--lsp"] }
indent = { tab-width = 2, unit = "  " }

Improved configuration for haskell

[[language]]
name = "haskell"
scope = "source.haskell"
injection-regex = "haskell"
file-types = ["hs"]
roots = ["Setup.hs", "stack.yaml", "*.cabal"]                                        # <---- added roots
comment-token = "--"
language-server = { command = "haskell-language-server-wrapper", args = ["--lsp"] }
indent = { tab-width = 2, unit = "  " }
@0rphee 0rphee added the C-enhancement Category: Improvements label Jul 4, 2022
@the-mikedavis
Copy link
Member

I agree 👍. Would you like to submit a PR?

@0rphee
Copy link
Contributor Author

0rphee commented Jul 4, 2022

Done! #2954

@0rphee 0rphee closed this as completed Jul 4, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
C-enhancement Category: Improvements
Projects
None yet
Development

No branches or pull requests

2 participants