Skip to content

Enable hls-cabal-gild-plugin for GHC 9.12.2 #4553

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 1 commit into from
Apr 9, 2025
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
2 changes: 1 addition & 1 deletion docs/support/plugin-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ For example, a plugin to provide a formatter which has itself been abandoned has
| `hls-refactor-plugin` | 2 | 9.12.2 |
| `hls-alternate-number-format-plugin` | 2 | |
| `hls-cabal-fmt-plugin` | 2 | |
| `hls-cabal-gild-plugin` | 2 | 9.12.2 |
| `hls-cabal-gild-plugin` | 2 | |
| `hls-class-plugin` | 2 | |
| `hls-change-type-signature-plugin` | 2 | |
| `hls-eval-plugin` | 2 | |
Expand Down
10 changes: 5 additions & 5 deletions haskell-language-server.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ flag cabalfmt
manual: True

common cabalfmt
if flag(cabalfmt)
if flag(cabalfmt) && flag(cabal)
build-depends: haskell-language-server:hls-cabal-fmt-plugin
cpp-options: -Dhls_cabalfmt

Expand All @@ -129,7 +129,7 @@ flag isolateCabalfmtTests

library hls-cabal-fmt-plugin
import: defaults, pedantic, warnings
if !flag(cabalfmt)
if !flag(cabalfmt) || !flag(cabal)
buildable: False
exposed-modules: Ide.Plugin.CabalFmt
hs-source-dirs: plugins/hls-cabal-fmt-plugin/src
Expand Down Expand Up @@ -174,7 +174,7 @@ flag cabalgild
manual: True

common cabalgild
if flag(cabalgild) && (impl(ghc < 9.11) || flag(ignore-plugins-ghc-bounds))
if flag(cabalgild) && flag(cabal)
build-depends: haskell-language-server:hls-cabal-gild-plugin
cpp-options: -Dhls_cabalgild

Expand All @@ -186,7 +186,7 @@ flag isolateCabalGildTests

library hls-cabal-gild-plugin
import: defaults, pedantic, warnings
if !flag(cabalgild) || (impl(ghc > 9.11) && !flag(ignore-plugins-ghc-bounds))
if !flag(cabalgild) || !flag(cabal)
buildable: False
exposed-modules: Ide.Plugin.CabalGild
hs-source-dirs: plugins/hls-cabal-gild-plugin/src
Expand All @@ -203,7 +203,7 @@ library hls-cabal-gild-plugin
-- The `hls-cabal-plugin` is needed for tests, as we need to install notification handlers
test-suite hls-cabal-gild-plugin-tests
import: defaults, pedantic, test-defaults, warnings
if !flag(cabalgild) || !flag(cabal) || (impl(ghc > 9.11) && !flag(ignore-plugins-ghc-bounds))
if !flag(cabalgild) || !flag(cabal)
buildable: False
type: exitcode-stdio-1.0
hs-source-dirs: plugins/hls-cabal-gild-plugin/test
Expand Down
5 changes: 5 additions & 0 deletions test/testdata/schema/ghc912/default-config.golden.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
"path": "cabal-fmt"
}
},
"cabal-gild": {
"config": {
"path": "cabal-gild"
}
},
"cabalHaskellIntegration": {
"globalOn": true
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
"scope": "resource",
"type": "string"
},
"haskell.plugin.cabal-gild.config.path": {
"default": "cabal-gild",
"markdownDescription": "Set path to 'cabal-gild' executable",
"scope": "resource",
"type": "string"
},
"haskell.plugin.cabal.codeActionsOn": {
"default": true,
"description": "Enables cabal code actions",
Expand Down
Loading