Skip to content
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
4 changes: 3 additions & 1 deletion docs/support/plugin-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ For example, a plugin to provide a formatter which has itself been abandoned has
| `hls-explicit-record-fields-plugin` | 2 | |
| `hls-fourmolu-plugin` | 2 | |
| `hls-gadt-plugin` | 2 | |
| `hls-hlint-plugin` | 2 | |
| `hls-hlint-plugin` | 2 | 9.10 [1] |
| `hls-module-name-plugin` | 2 | |
| `hls-notes-plugin` | 2 | |
| `hls-qualify-imported-names-plugin` | 2 | |
Expand All @@ -69,3 +69,5 @@ For example, a plugin to provide a formatter which has itself been abandoned has
| `hls-stan-plugin` | 3 | 9.12.2 |
| `hls-retrie-plugin` | 3 | 9.10.1, 9.12.2 |
| `hls-splice-plugin` | 3 | 9.10.1, 9.12.2 |

[1]: HLint is incompatible with GHC 9.10 series. See the issue [#4674](https://github.com/haskell/haskell-language-server/issues/4674) for discussion and explanation.
16 changes: 12 additions & 4 deletions haskell-language-server.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -709,14 +709,19 @@ flag hlint
manual: True

common hlint
if flag(hlint)
-- Hlint isn't compatible with GHC 9.10, and crashes in subtle ways.
-- See https://github.com/haskell/haskell-language-server/issues/4674
-- for its wake of destruction.
if flag(hlint) && !impl(ghc ==9.10.*)
build-depends: haskell-language-server:hls-hlint-plugin
cpp-options: -Dhls_hlint

library hls-hlint-plugin
import: defaults, pedantic, warnings
-- https://github.com/ndmitchell/hlint/pull/1594
if !flag(hlint)
-- Hlint isn't compatible with GHC 9.10, and crashes in subtle ways.
-- See https://github.com/haskell/haskell-language-server/issues/4674
-- for its wake of destruction.
if !flag(hlint) || impl(ghc ==9.10.*)
buildable: False
exposed-modules: Ide.Plugin.Hlint
hs-source-dirs: plugins/hls-hlint-plugin/src
Expand Down Expand Up @@ -763,7 +768,10 @@ library hls-hlint-plugin

test-suite hls-hlint-plugin-tests
import: defaults, pedantic, test-defaults, warnings
if !flag(hlint)
-- Hlint isn't compatible with GHC 9.10, and crashes in subtle ways.
-- See https://github.com/haskell/haskell-language-server/issues/4674
-- for its wake of destruction.
if !flag(hlint) || impl(ghc ==9.10.*)
buildable: False
type: exitcode-stdio-1.0
hs-source-dirs: plugins/hls-hlint-plugin/test
Expand Down
7 changes: 0 additions & 7 deletions test/testdata/schema/ghc910/default-config.golden.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,6 @@
},
"globalOn": true
},
"hlint": {
"codeActionsOn": true,
"config": {
"flags": []
},
"diagnosticsOn": true
},
"importLens": {
"codeActionsOn": true,
"codeLensOn": true,
Expand Down
5 changes: 0 additions & 5 deletions test/testdata/schema/ghc910/markdown-reference.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
## hlint
| Property | Description | Default | Allowed values |
| --- | --- | --- | --- |
| `flags` | Flags used by hlint | `TODO: Array values` |   |

## cabal-fmt
| Property | Description | Default | Allowed values |
| --- | --- | --- | --- |
Expand Down
18 changes: 0 additions & 18 deletions test/testdata/schema/ghc910/vscode-extension-schema.golden.json
Original file line number Diff line number Diff line change
Expand Up @@ -213,24 +213,6 @@
"scope": "resource",
"type": "boolean"
},
"haskell.plugin.hlint.codeActionsOn": {
"default": true,
"description": "Enables hlint code actions",
"scope": "resource",
"type": "boolean"
},
"haskell.plugin.hlint.config.flags": {
"default": [],
"markdownDescription": "Flags used by hlint",
"scope": "resource",
"type": "array"
},
"haskell.plugin.hlint.diagnosticsOn": {
"default": true,
"description": "Enables hlint diagnostics",
"scope": "resource",
"type": "boolean"
},
"haskell.plugin.importLens.codeActionsOn": {
"default": true,
"description": "Enables importLens code actions",
Expand Down
Loading