From 9bd9afc85a829828c3d7477e95eda83808aae4b4 Mon Sep 17 00:00:00 2001 From: Fendor Date: Tue, 16 Jan 2024 19:14:11 +0100 Subject: [PATCH] Document cabal diagnostic options --- plugins/hls-cabal-plugin/src/Ide/Plugin/Cabal.hs | 3 +++ test/testdata/schema/ghc92/default-config.golden.json | 3 ++- .../schema/ghc92/vscode-extension-schema.golden.json | 6 ++++++ test/testdata/schema/ghc94/default-config.golden.json | 3 ++- .../schema/ghc94/vscode-extension-schema.golden.json | 6 ++++++ test/testdata/schema/ghc96/default-config.golden.json | 3 ++- .../schema/ghc96/vscode-extension-schema.golden.json | 6 ++++++ test/testdata/schema/ghc98/default-config.golden.json | 3 ++- .../schema/ghc98/vscode-extension-schema.golden.json | 6 ++++++ 9 files changed, 35 insertions(+), 4 deletions(-) diff --git a/plugins/hls-cabal-plugin/src/Ide/Plugin/Cabal.hs b/plugins/hls-cabal-plugin/src/Ide/Plugin/Cabal.hs index 483c5c2820..c92f82168b 100644 --- a/plugins/hls-cabal-plugin/src/Ide/Plugin/Cabal.hs +++ b/plugins/hls-cabal-plugin/src/Ide/Plugin/Cabal.hs @@ -114,6 +114,9 @@ descriptor recorder plId = deleteFileOfInterest recorder ide file restartCabalShakeSession (shakeExtras ide) vfs file "(closed)" ] + , pluginConfigDescriptor = defaultConfigDescriptor + { configHasDiagnostics = True + } } where log' = logWith recorder diff --git a/test/testdata/schema/ghc92/default-config.golden.json b/test/testdata/schema/ghc92/default-config.golden.json index d4e9e717b7..969de15cbc 100644 --- a/test/testdata/schema/ghc92/default-config.golden.json +++ b/test/testdata/schema/ghc92/default-config.golden.json @@ -9,7 +9,8 @@ }, "cabal": { "codeActionsOn": true, - "completionOn": true + "completionOn": true, + "diagnosticsOn": true }, "callHierarchy": { "globalOn": true diff --git a/test/testdata/schema/ghc92/vscode-extension-schema.golden.json b/test/testdata/schema/ghc92/vscode-extension-schema.golden.json index c063ad0b5a..59701992ff 100644 --- a/test/testdata/schema/ghc92/vscode-extension-schema.golden.json +++ b/test/testdata/schema/ghc92/vscode-extension-schema.golden.json @@ -17,6 +17,12 @@ "scope": "resource", "type": "boolean" }, + "haskell.plugin.cabal.diagnosticsOn": { + "default": true, + "description": "Enables cabal diagnostics", + "scope": "resource", + "type": "boolean" + }, "haskell.plugin.callHierarchy.globalOn": { "default": true, "description": "Enables callHierarchy plugin", diff --git a/test/testdata/schema/ghc94/default-config.golden.json b/test/testdata/schema/ghc94/default-config.golden.json index 6b1a3c3b5f..fc31d1b27e 100644 --- a/test/testdata/schema/ghc94/default-config.golden.json +++ b/test/testdata/schema/ghc94/default-config.golden.json @@ -9,7 +9,8 @@ }, "cabal": { "codeActionsOn": true, - "completionOn": true + "completionOn": true, + "diagnosticsOn": true }, "callHierarchy": { "globalOn": true diff --git a/test/testdata/schema/ghc94/vscode-extension-schema.golden.json b/test/testdata/schema/ghc94/vscode-extension-schema.golden.json index 6b3cdc4384..4705b2bd30 100644 --- a/test/testdata/schema/ghc94/vscode-extension-schema.golden.json +++ b/test/testdata/schema/ghc94/vscode-extension-schema.golden.json @@ -17,6 +17,12 @@ "scope": "resource", "type": "boolean" }, + "haskell.plugin.cabal.diagnosticsOn": { + "default": true, + "description": "Enables cabal diagnostics", + "scope": "resource", + "type": "boolean" + }, "haskell.plugin.callHierarchy.globalOn": { "default": true, "description": "Enables callHierarchy plugin", diff --git a/test/testdata/schema/ghc96/default-config.golden.json b/test/testdata/schema/ghc96/default-config.golden.json index 6b1a3c3b5f..fc31d1b27e 100644 --- a/test/testdata/schema/ghc96/default-config.golden.json +++ b/test/testdata/schema/ghc96/default-config.golden.json @@ -9,7 +9,8 @@ }, "cabal": { "codeActionsOn": true, - "completionOn": true + "completionOn": true, + "diagnosticsOn": true }, "callHierarchy": { "globalOn": true diff --git a/test/testdata/schema/ghc96/vscode-extension-schema.golden.json b/test/testdata/schema/ghc96/vscode-extension-schema.golden.json index 6b3cdc4384..4705b2bd30 100644 --- a/test/testdata/schema/ghc96/vscode-extension-schema.golden.json +++ b/test/testdata/schema/ghc96/vscode-extension-schema.golden.json @@ -17,6 +17,12 @@ "scope": "resource", "type": "boolean" }, + "haskell.plugin.cabal.diagnosticsOn": { + "default": true, + "description": "Enables cabal diagnostics", + "scope": "resource", + "type": "boolean" + }, "haskell.plugin.callHierarchy.globalOn": { "default": true, "description": "Enables callHierarchy plugin", diff --git a/test/testdata/schema/ghc98/default-config.golden.json b/test/testdata/schema/ghc98/default-config.golden.json index 0a8cd9afe7..30923a314f 100644 --- a/test/testdata/schema/ghc98/default-config.golden.json +++ b/test/testdata/schema/ghc98/default-config.golden.json @@ -9,7 +9,8 @@ }, "cabal": { "codeActionsOn": true, - "completionOn": true + "completionOn": true, + "diagnosticsOn": true }, "callHierarchy": { "globalOn": true diff --git a/test/testdata/schema/ghc98/vscode-extension-schema.golden.json b/test/testdata/schema/ghc98/vscode-extension-schema.golden.json index 962f3138b3..03f0d77194 100644 --- a/test/testdata/schema/ghc98/vscode-extension-schema.golden.json +++ b/test/testdata/schema/ghc98/vscode-extension-schema.golden.json @@ -17,6 +17,12 @@ "scope": "resource", "type": "boolean" }, + "haskell.plugin.cabal.diagnosticsOn": { + "default": true, + "description": "Enables cabal diagnostics", + "scope": "resource", + "type": "boolean" + }, "haskell.plugin.callHierarchy.globalOn": { "default": true, "description": "Enables callHierarchy plugin",