Skip to content

Delete hls-haddock-comments-plugin, hls-stan-plugin, and hls-tactics-plugin #3782

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 6 commits into from
Aug 30, 2023
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 0 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,6 @@ jobs:
name: Test hls-eval-plugin
run: cabal test hls-eval-plugin --test-options="$TEST_OPTS" || cabal test hls-eval-plugin --test-options="$TEST_OPTS"

- if: matrix.test && matrix.ghc != '9.2' && matrix.ghc != '9.4' && matrix.ghc != '9.6'
name: Test hls-haddock-comments-plugin
run: cabal test hls-haddock-comments-plugin --test-options="$TEST_OPTS" || cabal test hls-haddock-comments-plugin --test-options="$TEST_OPTS"

- if: matrix.test
name: Test hls-splice-plugin
run: cabal test hls-splice-plugin --test-options="$TEST_OPTS" || cabal test hls-splice-plugin --test-options="$TEST_OPTS"
Expand All @@ -175,10 +171,6 @@ jobs:
name: Test hls-fourmolu-plugin
run: cabal test hls-fourmolu-plugin --test-options="$TEST_OPTS" || cabal test hls-fourmolu-plugin --test-options="$TEST_OPTS"

- if: matrix.test && matrix.ghc != '9.2' && matrix.ghc != '9.4' && matrix.ghc != '9.6'
name: Test hls-tactics-plugin test suite
run: cabal test hls-tactics-plugin --test-options="$TEST_OPTS" || cabal test hls-tactics-plugin --test-options="$TEST_OPTS"

- if: matrix.test
name: Test hls-explicit-imports-plugin test suite
run: cabal test hls-explicit-imports-plugin --test-options="$TEST_OPTS" || cabal test hls-explicit-imports-plugin --test-options="$TEST_OPTS"
Expand All @@ -195,10 +187,6 @@ jobs:
name: Test hls-hlint-plugin test suite
run: cabal test hls-hlint-plugin --test-options="$TEST_OPTS" || cabal test hls-hlint-plugin --test-options="$TEST_OPTS"

- if: matrix.test && matrix.ghc != '9.0' && matrix.ghc != '9.2' && matrix.ghc != '9.4' && matrix.ghc != '9.6'
name: Test hls-stan-plugin test suite
run: cabal test hls-stan-plugin --test-options="$TEST_OPTS" || cabal test hls-stan-plugin --test-options="$TEST_OPTS"

- if: matrix.test
name: Test hls-module-name-plugin test suite
run: cabal test hls-module-name-plugin --test-options="$TEST_OPTS" || cabal test hls-module-name-plugin --test-options="$TEST_OPTS"
Expand Down
3 changes: 0 additions & 3 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
/plugins/hls-floskell-plugin @Ailrun
/plugins/hls-fourmolu-plugin @georgefst
/plugins/hls-gadt-plugin @July541
/plugins/hls-haddock-comments-plugin @berberman @kokobd
/plugins/hls-hlint-plugin @eddiemundo
/plugins/hls-module-name-plugin
/plugins/hls-ormolu-plugin @georgefst
Expand All @@ -29,8 +28,6 @@
/plugins/hls-code-range-plugin @kokobd
/plugins/hls-splice-plugin @konn
/plugins/hls-stylish-haskell-plugin @Ailrun
/plugins/hls-tactics-plugin
/plugins/hls-stan-plugin @uhbif19
/plugins/hls-explicit-record-fields-plugin @ozkutuk
/plugins/hls-overloaded-record-dot-plugin @joyfulmantis

Expand Down
3 changes: 0 additions & 3 deletions bench/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@ configurations:
# # - ghcide-core # implicitly included in all configurations
# # - ghcide-hover-and-symbols # implicitly included in all configurations
# - ghcide-type-lenses
# - haddockComments
# - hlint
# - importLens
# - moduleName
Expand All @@ -215,6 +214,4 @@ configurations:
# - rename
# - retrie
# - splice
# - stan
# # - stylish-haskell
# - tactics
3 changes: 0 additions & 3 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ packages:
./hls-test-utils
./plugins/hls-cabal-plugin
./plugins/hls-cabal-fmt-plugin
./plugins/hls-tactics-plugin
./plugins/hls-stylish-haskell-plugin
./plugins/hls-fourmolu-plugin
./plugins/hls-class-plugin
Expand All @@ -19,7 +18,6 @@ packages:
./plugins/hls-hlint-plugin
./plugins/hls-rename-plugin
./plugins/hls-retrie-plugin
./plugins/hls-haddock-comments-plugin
./plugins/hls-splice-plugin
./plugins/hls-floskell-plugin
./plugins/hls-pragmas-plugin
Expand All @@ -30,7 +28,6 @@ packages:
./plugins/hls-qualify-imported-names-plugin
./plugins/hls-code-range-plugin
./plugins/hls-change-type-signature-plugin
./plugins/hls-stan-plugin
./plugins/hls-gadt-plugin
./plugins/hls-explicit-fixity-plugin
./plugins/hls-explicit-record-fields-plugin
Expand Down
8 changes: 1 addition & 7 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,13 @@ Here is a list of the additional settings currently supported by `haskell-langua
Plugins have a generic config to control their behaviour. The schema of such config is:

- `haskell.plugin.${pluginName}.globalOn`: usually with default true. Whether the plugin is enabled at runtime or it is not. That is the option you might use if you want to disable completely a plugin.
- Actual plugin names are: `ghcide-code-actions-fill-holes`, `ghcide-completions`, `ghcide-hover-and-symbols`, `ghcide-type-lenses`, `ghcide-code-actions-type-signatures`, `ghcide-code-actions-bindings`, `ghcide-code-actions-imports-exports`, `eval`, `moduleName`, `pragmas`, `importLens`, `class`, `tactics` (aka wingman), `hlint`, `haddockComments`, `retrie`, `rename`, `splice`, `stan`.
- Actual plugin names are: `ghcide-code-actions-fill-holes`, `ghcide-completions`, `ghcide-hover-and-symbols`, `ghcide-type-lenses`, `ghcide-code-actions-type-signatures`, `ghcide-code-actions-bindings`, `ghcide-code-actions-imports-exports`, `eval`, `moduleName`, `pragmas`, `importLens`, `class`, `hlint`, `retrie`, `rename`, `splice`.
- So to disable the import lens with an explicit list of module definitions you could set `haskell.plugin.importLens.globalOn: false`
- `haskell.plugin.${pluginName}.${lspCapability}On`: usually with default true. Whether a concrete plugin capability is enabled.
- Capabilities are the different ways a lsp server can interact with the editor. The current available capabilities of the server are: `callHierarchy`, `codeActions`, `codeLens`, `diagnostics`, `hover`, `symbols`, `completion`, `rename`.
- Note that usually plugins don't provide all capabilities but some of them or even only one.
- So to disable code changes suggestions from the `hlint` plugin (but no diagnostics) you could set `haskell.plugin.hlint.codeActionsOn: false`
- Plugin specific configuration:
- `tactic` (aka wingman):
- `haskell.plugin.tactics.config.auto_gas`, default 4: The depth of the search tree when performing "Attempt to fill hole". Bigger values will be able to derive more solutions, but will take exponentially more time.
- `haskell.plugin.tactics.config.timeout_duration`, default 2: The timeout for Wingman actions, in seconds.
- `haskell.plugin.tactics.config.hole_severity`, default empty: The severity to use when showing hole diagnostics. These are noisy, but some editors don't allow jumping to all severities. One of `error`, `warning`, `info`, `hint`, `none`.
- `haskell.plugin.tactics.config.max_use_ctor_actions`, default 5: Maximum number of `Use constructor <x>` code actions that can appear.
- `haskell.plugin.tactics.config.proofstate_styling`, default true: Should Wingman emit styling markup when showing metaprogram proof states?
- `eval`:
- `haskell.plugin.eval.config.diff`, default true: When reloading haddock test results in changes, mark it with WAS/NOW.
- `haskell.plugin.eval.config.exception`, default false: When the command results in an exception, mark it with `*** Exception:`.
Expand Down
1 change: 0 additions & 1 deletion docs/contributing/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ pre-commit install

- `test/testdata` and `test/data` are there as we want to test formatting plugins.
- `hie-compat` is there as we want to keep its code as close to GHC as possible.
- `hls-tactics-plugin` is there as the main contributor of the plugin (@isovector) does not want auto-formatting.

## Introduction tutorial

Expand Down
2 changes: 1 addition & 1 deletion docs/contributing/plugin-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ generateLens pId uri minImports (L src imp)
## Wrapping up

There's only one haskell code change left to do at this point: "link" the plugin in the `HlsPlugins` HLS module.
However integrating the plugin in haskell-language-server itself will need some changes in config files. The best way is looking for the id (f.e. `hls-tactics-plugin`) of an existing plugin:
However integrating the plugin in haskell-language-server itself will need some changes in config files. The best way is looking for the id (f.e. `hls-class-plugin`) of an existing plugin:
- `./cabal*.project` and `./stack*.yaml`: add the plugin package in the `packages` field
- `./haskell-language-server.cabal`: add a conditional block with the plugin package dependency
- `./.github/workflows/test.yml`: add a block to run the test suite of the plugin
Expand Down
24 changes: 0 additions & 24 deletions docs/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,6 @@ Provided by: `hls-hlint-plugin`

Provides hlint hints as diagnostics.

### Stan hints

Provided by: `hls-stan-plugin`

Provides Stan hints as diagnostics.

### Cabal parse errors and warnings

Provided by: `hls-cabal-plugin`
Expand Down Expand Up @@ -244,24 +238,6 @@ Converts numeric literals to different formats.

![Alternate Number Format Demo](../plugins/hls-alternate-number-format-plugin/HLSAll.gif)

### Add Haddock comments

Provided by: `hls-haddock-comments-plugin`

Code action kind: `quickfix`

Adds Haddock comments for function arguments.

### Wingman

Status: Not supported on GHC 9.2

Provided by: `hls-tactics-plugin`

Provides a variety of code actions for interactive code development, see <https://haskellwingman.dev/> for more details.

![Wingman Demo](https://user-images.githubusercontent.com/307223/92657198-3d4be400-f2a9-11ea-8ad3-f541c8eea891.gif)

### Change Type Signature

Provided by: `hls-change-type-signature-plugin`
Expand Down
3 changes: 0 additions & 3 deletions docs/support/plugin-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,7 @@ For example, a plugin to provide a formatter which has itself been abandoned has
| `hls-ormolu-plugin` | 2 | |
| `hls-rename-plugin` | 2 | |
| `hls-stylish-haskell-plugin` | 2 | |
| `hls-tactics-plugin` | 2 | 9.2, 9.4, 9.6 |
| `hls-overloaded-record-dot-plugin` | 2 | 8.10, 9.0 |
| `hls-floskell-plugin` | 3 | 9.6 |
| `hls-haddock-comments-plugin` | 3 | 9.2, 9.4, 9.6 |
| `hls-stan-plugin` | 3 | 8.6, 9.0, 9.2, 9.4, 9.6 |
| `hls-retrie-plugin` | 3 | |
| `hls-splice-plugin` | 3 | |
33 changes: 0 additions & 33 deletions haskell-language-server.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,6 @@ flag callHierarchy
default: True
manual: True

flag haddockComments
description: Enable haddockComments plugin
default: True
manual: True

flag eval
description: Enable eval plugin
default: True
Expand All @@ -104,21 +99,11 @@ flag retrie
default: True
manual: True

flag tactic
description: Enable tactic plugin
default: True
manual: True

flag hlint
description: Enable hlint plugin
default: True
manual: True

flag stan
description: Enable stan plugin
default: True
manual: True

flag moduleName
description: Enable moduleName plugin
default: True
Expand Down Expand Up @@ -231,11 +216,6 @@ common callHierarchy
build-depends: hls-call-hierarchy-plugin == 2.2.0.0
cpp-options: -Dhls_callHierarchy

common haddockComments
if flag(haddockComments) && (impl(ghc < 9.2.1) || flag(ignore-plugins-ghc-bounds))
build-depends: hls-haddock-comments-plugin == 2.2.0.0
cpp-options: -Dhls_haddockComments

common eval
if flag(eval)
build-depends: hls-eval-plugin == 2.2.0.0
Expand All @@ -256,21 +236,11 @@ common retrie
build-depends: hls-retrie-plugin == 2.2.0.0
cpp-options: -Dhls_retrie

common tactic
if flag(tactic) && (impl(ghc < 9.2.1) || flag(ignore-plugins-ghc-bounds))
build-depends: hls-tactics-plugin == 2.2.0.0
cpp-options: -Dhls_tactic

common hlint
if flag(hlint)
build-depends: hls-hlint-plugin == 2.2.0.0
cpp-options: -Dhls_hlint

common stan
if flag(stan) && (impl(ghc >= 8.10) && impl(ghc < 9.0))
build-depends: hls-stan-plugin == 2.2.0.0
cpp-options: -Dhls_stan

common moduleName
if flag(moduleName)
build-depends: hls-module-name-plugin == 2.2.0.0
Expand Down Expand Up @@ -364,14 +334,11 @@ library
, cabalfmt
, changeTypeSignature
, class
, haddockComments
, eval
, importLens
, rename
, retrie
, tactic
, hlint
, stan
, moduleName
, pragmas
, splice
Expand Down
Loading