From 6521816ee1d076de36430b5b7b32e5e138b9e396 Mon Sep 17 00:00:00 2001 From: Javier Neira Date: Mon, 25 Oct 2021 12:55:53 +0200 Subject: [PATCH 1/7] Reorganize README * Add links to hls documentation * Separate features from demos (with links) * Remove local docs sections present in the server docs --- README.md | 99 ++++++++++++++++++++++++------------------------------- 1 file changed, 43 insertions(+), 56 deletions(-) diff --git a/README.md b/README.md index 7659aa6b..c922c362 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,8 @@ [![vsmarketplacebadge](https://vsmarketplacebadge.apphb.com/version/haskell.haskell.svg)](https://marketplace.visualstudio.com/items?itemName=haskell.haskell) -This extension adds language support for [Haskell](https://haskell.org), powered by the [Haskell Language Server](https://github.com/haskell/haskell-language-server). +This extension adds language support for [Haskell](https://haskell.org), powered by the [Haskell Language Server](https://github.com/haskell/haskell-language-server). +As almost all features are provided by the server you might find interesting read its [documentation](https://haskell-language-server.readthedocs.io). ## Features @@ -13,35 +14,15 @@ This extension adds language support for [Haskell](https://haskell.org), powered - Highlight references in document - Code completion - Show documentation and sources in hackage -- Formatting via Brittany, Floskell, Fourmolu, Ormolu or Stylish Haskell +- Formatting via [Brittany](https://github.com/lspitzner/brittany), [Floskell](https://github.com/ennocramer/floskell), [Fourmolu](https://github.com/fourmolu/fourmolu), [Ormolu](https://github.com/tweag/ormolu) or [Stylish Haskell](https://github.com/haskell/stylish-haskell) - [Multi-root workspace](https://code.visualstudio.com/docs/editor/multi-root-workspaces) support -- Code evaluation (Haskell Language Server), see ([Tutorial](https://github.com/haskell/haskell-language-server/blob/master/plugins/hls-eval-plugin/README.md)) - - ![Eval Demo](https://raw.githubusercontent.com/haskell/haskell-language-server/master/plugins/hls-eval-plugin/demo.gif) - -- Integration with [retrie](https://hackage.haskell.org/package/retrie) - - ![Retrie Demo](https://i.imgur.com/Ev7B87k.gif) - -- Code lenses for explicit import lists - - ![Imports code lens Demo](https://imgur.com/pX9kvY4.gif) - -- Generate functions from type signatures, and intelligently complete holes using [Wingman (tactics)](https://github.com/haskell/haskell-language-server/tree/master/plugins/hls-tactics-plugin) - - ![Wingman Demo](https://user-images.githubusercontent.com/307223/92657198-3d4be400-f2a9-11ea-8ad3-f541c8eea891.gif) - -- Integration with [hlint](https://github.com/ndmitchell/hlint) to show diagnostics and apply hints via [apply-refact](https://github.com/mpickering/apply-refact) - - ![Hlint Demo](https://user-images.githubusercontent.com/54035/110860028-8f9fa900-82bc-11eb-9fe5-6483d8bb95e6.gif) - -- Module name suggestions for insertion or correction - - ![Module Name Demo](https://user-images.githubusercontent.com/54035/110860755-78ad8680-82bd-11eb-9845-9ea4b1cc1f76.gif) - -- Call hierarchy support - - ![Call Hierarchy in VSCode](https://github.com/haskell/haskell-language-server/raw/2857eeece0398e1cd4b2ffb6069b05c4d2308b39/plugins/hls-call-hierarchy-plugin/call-hierarchy-in-vscode.gif) +- [Code evaluation](#Code_evaluation), see its [Tutorial](https://github.com/haskell/haskell-language-server/blob/master/plugins/hls-eval-plugin/README.md) +- [Integration with](#Retrie_integration) [retrie](https://hackage.haskell.org/package/retrie), a powerful, easy-to-use codemodding tool +- [Code lenses for explicit import lists](#Explicit_import_lists) +- [Generate functions from type signatures, and intelligently complete holes using](#Wingman) [Wingman (tactics)](https://github.com/haskell/haskell-language-server/tree/master/plugins/hls-tactics-plugin) +- [Integration with](#Hlint) [hlint](https://github.com/ndmitchell/hlint), the most used haskell linter, to show diagnostics and apply hints via [apply-refact](https://github.com/mpickering/apply-refact) +- [Module name suggestions](#Module_names) for insertion or correction +- [Call hierarchy support](#Call_hierarchy) ## Requirements @@ -52,6 +33,8 @@ This extension adds language support for [Haskell](https://haskell.org), powered ## Configuration options +For a general picture about the server configuration, including the project setup, [you can consult the server documentation about the topic](https://haskell-language-server.readthedocs.io/en/latest/configuration.html). + ### Path to server executable If your server is manually installed and not on your path, you can also manually set the path to the executable. @@ -72,33 +55,6 @@ This supposes it could be used to execute arbitrary programs adding a `.vscode/s For this reason its scope will be changed to `machine` so users only will be able to change it globally. See #387 for more details. -### Local documentation - -Haskell Language Server can display Haddock documentation on hover and completions if the project and -its dependencies have been built with the `-haddock` GHC flag. - -- For cabal: - - - Add to your global config file (e.g. `~/.cabal/config`): - - ```yaml - program-default-options - ghc-options: -haddock - ``` - - - Or, for a single project, run `cabal configure --ghc-options=-haddock` - -- For stack, add to global `$STACK_ROOT\config.yaml`, or project's `stack.yaml`: - - ```yaml - ghc-options: - '$everything': -haddock - ``` - - Note that this flag will cause compilation errors if a dependency contains invalid Haddock markup, - until GHC 9.0 which [will report warnings](https://gitlab.haskell.org/ghc/ghc/-/merge_requests/2377) - instead. - ### Downloaded binaries This extension will download `haskell-language-server` binaries to a specific location depending on your system. If you find yourself running out of disk space, you can try deleting old versions of language servers in this directory. The extension will redownload them, no strings attached. @@ -130,6 +86,7 @@ These are the versions of GHC that there are binaries of `haskell-language-serve | 8.6.4 | ✓ | ✓ | ✓ | The exact list of binaries can be checked in the last release of haskell-language-server: +You can check the current GHC versions support status and the policy followed for deprecations [here](https://haskell-language-server.readthedocs.io/en/latest/supported-versions.html). ## Using multi-root workspaces @@ -161,3 +118,33 @@ If you want to help, get started by reading [Contributing](https://github.com/ha ## Release Notes See the [Changelog](https://github.com/haskell/vscode-haskell/blob/master/Changelog.md) for more details. + +## Demos + +### Code evaluation + +![Eval Demo](https://raw.githubusercontent.com/haskell/haskell-language-server/master/plugins/hls-eval-plugin/demo.gif) + +### Retrie integration + +![Retrie Demo](https://i.imgur.com/Ev7B87k.gif) + +### Explicit import lists + +![Imports code lens Demo](https://imgur.com/pX9kvY4.gif) + +### Wingman + +![Wingman Demo](https://user-images.githubusercontent.com/307223/92657198-3d4be400-f2a9-11ea-8ad3-f541c8eea891.gif) + +### Hlint + +![Hlint Demo](https://user-images.githubusercontent.com/54035/110860028-8f9fa900-82bc-11eb-9fe5-6483d8bb95e6.gif) + +### Module names + +![Module Name Demo](https://user-images.githubusercontent.com/54035/110860755-78ad8680-82bd-11eb-9845-9ea4b1cc1f76.gif) + +### Call hierarchy + +![Call Hierarchy in VSCode](https://github.com/haskell/haskell-language-server/raw/2857eeece0398e1cd4b2ffb6069b05c4d2308b39/plugins/hls-call-hierarchy-plugin/call-hierarchy-in-vscode.gif) From c802685a5f3d2718425b8036d2beb8d9bad6aea9 Mon Sep 17 00:00:00 2001 From: Javier Neira Date: Mon, 25 Oct 2021 12:57:42 +0200 Subject: [PATCH 2/7] Correct internal links to demos --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index c922c362..269c9290 100644 --- a/README.md +++ b/README.md @@ -16,13 +16,13 @@ As almost all features are provided by the server you might find interesting rea - Show documentation and sources in hackage - Formatting via [Brittany](https://github.com/lspitzner/brittany), [Floskell](https://github.com/ennocramer/floskell), [Fourmolu](https://github.com/fourmolu/fourmolu), [Ormolu](https://github.com/tweag/ormolu) or [Stylish Haskell](https://github.com/haskell/stylish-haskell) - [Multi-root workspace](https://code.visualstudio.com/docs/editor/multi-root-workspaces) support -- [Code evaluation](#Code_evaluation), see its [Tutorial](https://github.com/haskell/haskell-language-server/blob/master/plugins/hls-eval-plugin/README.md) -- [Integration with](#Retrie_integration) [retrie](https://hackage.haskell.org/package/retrie), a powerful, easy-to-use codemodding tool -- [Code lenses for explicit import lists](#Explicit_import_lists) -- [Generate functions from type signatures, and intelligently complete holes using](#Wingman) [Wingman (tactics)](https://github.com/haskell/haskell-language-server/tree/master/plugins/hls-tactics-plugin) -- [Integration with](#Hlint) [hlint](https://github.com/ndmitchell/hlint), the most used haskell linter, to show diagnostics and apply hints via [apply-refact](https://github.com/mpickering/apply-refact) -- [Module name suggestions](#Module_names) for insertion or correction -- [Call hierarchy support](#Call_hierarchy) +- [Code evaluation](#code_evaluation), see its [Tutorial](https://github.com/haskell/haskell-language-server/blob/master/plugins/hls-eval-plugin/README.md) +- [Integration with](#retrie_integration) [retrie](https://hackage.haskell.org/package/retrie), a powerful, easy-to-use codemodding tool +- [Code lenses for explicit import lists](#explicit_import_lists) +- [Generate functions from type signatures, and intelligently complete holes using](#wingman) [Wingman (tactics)](https://github.com/haskell/haskell-language-server/tree/master/plugins/hls-tactics-plugin) +- [Integration with](#hlint) [hlint](https://github.com/ndmitchell/hlint), the most used haskell linter, to show diagnostics and apply hints via [apply-refact](https://github.com/mpickering/apply-refact) +- [Module name suggestions](#module_names) for insertion or correction +- [Call hierarchy support](#call_hierarchy) ## Requirements From 336ed53bfcb2210ecc9eedf36379d11cb09a7be0 Mon Sep 17 00:00:00 2001 From: Javier Neira Date: Mon, 25 Oct 2021 13:00:09 +0200 Subject: [PATCH 3/7] Correct links 2 try --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 269c9290..bc4a7147 100644 --- a/README.md +++ b/README.md @@ -16,13 +16,13 @@ As almost all features are provided by the server you might find interesting rea - Show documentation and sources in hackage - Formatting via [Brittany](https://github.com/lspitzner/brittany), [Floskell](https://github.com/ennocramer/floskell), [Fourmolu](https://github.com/fourmolu/fourmolu), [Ormolu](https://github.com/tweag/ormolu) or [Stylish Haskell](https://github.com/haskell/stylish-haskell) - [Multi-root workspace](https://code.visualstudio.com/docs/editor/multi-root-workspaces) support -- [Code evaluation](#code_evaluation), see its [Tutorial](https://github.com/haskell/haskell-language-server/blob/master/plugins/hls-eval-plugin/README.md) -- [Integration with](#retrie_integration) [retrie](https://hackage.haskell.org/package/retrie), a powerful, easy-to-use codemodding tool -- [Code lenses for explicit import lists](#explicit_import_lists) +- [Code evaluation](#code evaluation), see its [Tutorial](https://github.com/haskell/haskell-language-server/blob/master/plugins/hls-eval-plugin/README.md) +- [Integration with](#retrie integration) [retrie](https://hackage.haskell.org/package/retrie), a powerful, easy-to-use codemodding tool +- [Code lenses for explicit import lists](#explicit import lists) - [Generate functions from type signatures, and intelligently complete holes using](#wingman) [Wingman (tactics)](https://github.com/haskell/haskell-language-server/tree/master/plugins/hls-tactics-plugin) - [Integration with](#hlint) [hlint](https://github.com/ndmitchell/hlint), the most used haskell linter, to show diagnostics and apply hints via [apply-refact](https://github.com/mpickering/apply-refact) -- [Module name suggestions](#module_names) for insertion or correction -- [Call hierarchy support](#call_hierarchy) +- [Module name suggestions](#module names) for insertion or correction +- [Call hierarchy support](#call hierarchy) ## Requirements From eeb00f5eb84e9facc138001cc3da3dd5c92d6ac8 Mon Sep 17 00:00:00 2001 From: Javier Neira Date: Mon, 25 Oct 2021 13:01:37 +0200 Subject: [PATCH 4/7] It needs `-` :facepalm: --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index bc4a7147..67a56376 100644 --- a/README.md +++ b/README.md @@ -16,13 +16,13 @@ As almost all features are provided by the server you might find interesting rea - Show documentation and sources in hackage - Formatting via [Brittany](https://github.com/lspitzner/brittany), [Floskell](https://github.com/ennocramer/floskell), [Fourmolu](https://github.com/fourmolu/fourmolu), [Ormolu](https://github.com/tweag/ormolu) or [Stylish Haskell](https://github.com/haskell/stylish-haskell) - [Multi-root workspace](https://code.visualstudio.com/docs/editor/multi-root-workspaces) support -- [Code evaluation](#code evaluation), see its [Tutorial](https://github.com/haskell/haskell-language-server/blob/master/plugins/hls-eval-plugin/README.md) -- [Integration with](#retrie integration) [retrie](https://hackage.haskell.org/package/retrie), a powerful, easy-to-use codemodding tool -- [Code lenses for explicit import lists](#explicit import lists) +- [Code evaluation](#code-evaluation), see its [Tutorial](https://github.com/haskell/haskell-language-server/blob/master/plugins/hls-eval-plugin/README.md) +- [Integration with](#retrie-integration) [retrie](https://hackage.haskell.org/package/retrie), a powerful, easy-to-use codemodding tool +- [Code lenses for explicit import lists](#explicit-import-lists) - [Generate functions from type signatures, and intelligently complete holes using](#wingman) [Wingman (tactics)](https://github.com/haskell/haskell-language-server/tree/master/plugins/hls-tactics-plugin) - [Integration with](#hlint) [hlint](https://github.com/ndmitchell/hlint), the most used haskell linter, to show diagnostics and apply hints via [apply-refact](https://github.com/mpickering/apply-refact) -- [Module name suggestions](#module names) for insertion or correction -- [Call hierarchy support](#call hierarchy) +- [Module name suggestions](#module-names) for insertion or correction +- [Call hierarchy support](#call-hierarchy) ## Requirements From e08e071717f87b091c20250235a69b07ce05b2cb Mon Sep 17 00:00:00 2001 From: Javier Neira Date: Mon, 25 Oct 2021 13:03:22 +0200 Subject: [PATCH 5/7] Add md new line --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 67a56376..cdd745a5 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,7 @@ These are the versions of GHC that there are binaries of `haskell-language-serve | 8.6.5 | ✓ | ✓ | ✓ | | 8.6.4 | ✓ | ✓ | ✓ | -The exact list of binaries can be checked in the last release of haskell-language-server: +The exact list of binaries can be checked in the last release of haskell-language-server: You can check the current GHC versions support status and the policy followed for deprecations [here](https://haskell-language-server.readthedocs.io/en/latest/supported-versions.html). ## Using multi-root workspaces From 0d8dc3ea7c008d5aebf646ead31649a155e2f7cf Mon Sep 17 00:00:00 2001 From: Javier Neira Date: Mon, 25 Oct 2021 13:15:23 +0200 Subject: [PATCH 6/7] Link to demos --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index cdd745a5..f2e49807 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,8 @@ As almost all features are provided by the server you might find interesting rea ## Features +You can watch demos for some of these features [below](#demos). + - Warning and error diagnostics from GHC - Type information and documentation on hover - Jump to definition From c0cacc05e845fd7c6670877720ea9a3bacc5b074 Mon Sep 17 00:00:00 2001 From: Javier Neira Date: Wed, 27 Oct 2021 12:40:18 +0200 Subject: [PATCH 7/7] Remove demos and point to hls ones --- README.md | 50 ++++++++++---------------------------------------- 1 file changed, 10 insertions(+), 40 deletions(-) diff --git a/README.md b/README.md index f2e49807..734e7d5a 100644 --- a/README.md +++ b/README.md @@ -7,24 +7,24 @@ As almost all features are provided by the server you might find interesting rea ## Features -You can watch demos for some of these features [below](#demos). +You can watch demos for some of these features [here](https://haskell-language-server.readthedocs.io/en/latest/features.html#demos). - Warning and error diagnostics from GHC -- Type information and documentation on hover -- Jump to definition +- Type information and documentation on hover, [including your own comments](./configuration.md#how-to-show-local-documentation-on-hover). +- Jump to definition: [for now only for local code definitions](https://github.com/haskell/haskell-language-server/issues/708) - Document symbols - Highlight references in document - Code completion - Show documentation and sources in hackage - Formatting via [Brittany](https://github.com/lspitzner/brittany), [Floskell](https://github.com/ennocramer/floskell), [Fourmolu](https://github.com/fourmolu/fourmolu), [Ormolu](https://github.com/tweag/ormolu) or [Stylish Haskell](https://github.com/haskell/stylish-haskell) - [Multi-root workspace](https://code.visualstudio.com/docs/editor/multi-root-workspaces) support -- [Code evaluation](#code-evaluation), see its [Tutorial](https://github.com/haskell/haskell-language-server/blob/master/plugins/hls-eval-plugin/README.md) -- [Integration with](#retrie-integration) [retrie](https://hackage.haskell.org/package/retrie), a powerful, easy-to-use codemodding tool -- [Code lenses for explicit import lists](#explicit-import-lists) -- [Generate functions from type signatures, and intelligently complete holes using](#wingman) [Wingman (tactics)](https://github.com/haskell/haskell-language-server/tree/master/plugins/hls-tactics-plugin) -- [Integration with](#hlint) [hlint](https://github.com/ndmitchell/hlint), the most used haskell linter, to show diagnostics and apply hints via [apply-refact](https://github.com/mpickering/apply-refact) -- [Module name suggestions](#module-names) for insertion or correction -- [Call hierarchy support](#call-hierarchy) +- [Code evaluation](https://haskell-language-server.readthedocs.io/en/latest/features.html#code-evaluation), see its [Tutorial](https://github.com/haskell/haskell-language-server/blob/master/plugins/hls-eval-plugin/README.md) +- [Integration with](https://haskell-language-server.readthedocs.io/en/latest/features.html#retrie-integration) [retrie](https://hackage.haskell.org/package/retrie), a powerful, easy-to-use codemodding tool +- [Code lenses for explicit import lists](https://haskell-language-server.readthedocs.io/en/latest/features.html#explicit-import-lists) +- [Generate functions from type signatures, and intelligently complete holes using](https://haskell-language-server.readthedocs.io/en/latest/features.html#wingman) [Wingman (tactics)](https://github.com/haskell/haskell-language-server/tree/master/plugins/hls-tactics-plugin) +- [Integration](https://haskell-language-server.readthedocs.io/en/latest/features.html#hlint) with [hlint](https://github.com/ndmitchell/hlint), the most used haskell linter, to show diagnostics and apply hints via [apply-refact](https://github.com/mpickering/apply-refact) +- [Module name suggestions](https://haskell-language-server.readthedocs.io/en/latest/features.html#module-names) for insertion or correction +- [Call hierarchy support](https://haskell-language-server.readthedocs.io/en/latest/features.html#call-hierarchy) ## Requirements @@ -120,33 +120,3 @@ If you want to help, get started by reading [Contributing](https://github.com/ha ## Release Notes See the [Changelog](https://github.com/haskell/vscode-haskell/blob/master/Changelog.md) for more details. - -## Demos - -### Code evaluation - -![Eval Demo](https://raw.githubusercontent.com/haskell/haskell-language-server/master/plugins/hls-eval-plugin/demo.gif) - -### Retrie integration - -![Retrie Demo](https://i.imgur.com/Ev7B87k.gif) - -### Explicit import lists - -![Imports code lens Demo](https://imgur.com/pX9kvY4.gif) - -### Wingman - -![Wingman Demo](https://user-images.githubusercontent.com/307223/92657198-3d4be400-f2a9-11ea-8ad3-f541c8eea891.gif) - -### Hlint - -![Hlint Demo](https://user-images.githubusercontent.com/54035/110860028-8f9fa900-82bc-11eb-9fe5-6483d8bb95e6.gif) - -### Module names - -![Module Name Demo](https://user-images.githubusercontent.com/54035/110860755-78ad8680-82bd-11eb-9845-9ea4b1cc1f76.gif) - -### Call hierarchy - -![Call Hierarchy in VSCode](https://github.com/haskell/haskell-language-server/raw/2857eeece0398e1cd4b2ffb6069b05c4d2308b39/plugins/hls-call-hierarchy-plugin/call-hierarchy-in-vscode.gif)