Add Code Action for adding a module to your project's cabal file
For diagnostics complaining about the current haskell module being unknown, we now offer all possible code actions to add the module to a field in the responsible cabal file.
Additionally, this PR refactors the cabal-plugin into smaller modules and also refactors the add-package feature to have some shared functions to be used for both add-package and add-module.
Thank you to @Bodigrim for the changes in cabal-add that made it possible to implement this feature without a huge amount of pain! (It would be great to have a cabal-add release, so we don't have to have a source-repository :) )
https://github.com/user-attachments/assets/e3055dcb-c652-4d2e-879c-7ca154214a4c
@VeryMilkyJoe please upgrade to the latest commit of cabal-add, https://github.com/Bodigrim/cabal-add/commit/d831980e1d74af4c6a98d057cb980dad526dcfe2. Once you confirm that it works well, I'll make a release.
@VeryMilkyJoe please upgrade to the latest commit of
cabal-add, Bodigrim/cabal-add@d831980. Once you confirm that it works well, I'll make a release.
Done and all tests that matter are green :)
@VeryMilkyJoe here you go: https://hackage.haskell.org/package/cabal-add-0.2
In my opinion, this is in a merge ready state, unless anyone wants to look over it again :upside_down_face: @fendor?