-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make it possible to search for config without getCurrentDirectory #482
Make it possible to search for config without getCurrentDirectory #482
Conversation
Hello @jaspervdj |
Converting to draft while I'm groping in the dark, trying to make CI pass.. |
Actually feel free to leave the CI changes out, I can try to get them in as a separate PR. |
Ok, thank you. |
An attempt to resolve #478
The intention is to make it possible to avoid dependency on getCurrentDirectory (which is problematic in haskell-language-server where multiple things running concurrently might depend on current directory and having to setCurrentDirectory just for stylish-haskell to be able to find the right config might lead to various race conditions).
The way to achieve it is to introduce new datatype
ConfigSearchStrategy
whose constructorSearchFromDirectory startDir
makes it possible to supply a directory explicitly.See this HLS PR for an example of how this new functionality would be used: haskell/haskell-language-server#4338