Skip to content

Enhance formatting of the cabal-version error message #4436

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

Merged
merged 2 commits into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,14 @@ Code action kind: `quickfix`

Correct common misspelling of SPDX Licenses such as `BSD-3-Clause`.

### Add dependency to `cabal` file

Provided by: `hls-cabal-plugin`

Code action kind: `quickfix`

Add a missing package dependency to your `.cabal` file.

## Code lenses

### Add type signature
Expand Down
6 changes: 4 additions & 2 deletions plugins/hls-cabal-plugin/src/Ide/Plugin/Cabal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,10 @@ cabalRules recorder plId = do
-- user did not do anything wrong. Instead we cast it to a warning
regex = "Unsupported cabal-version [0-9]+.[0-9]*"
unsupportedCabalHelpText = unlines
[ "The used cabal version is not fully supported by HLS. This means that some functionality might not work as expected."
, "If you face any issues try to downgrade to a supported cabal version."
[ "The used `cabal-version` is not fully supported by this `HLS` binary."
, "Either the `cabal-version` is unknown, or too new for this executable."
, "This means that some functionality might not work as expected."
, "If you face any issues, try downgrading to a supported `cabal-version` or upgrading `HLS` if possible."
, ""
, "Supported versions are: " <>
List.intercalate ", "
Expand Down
Loading