-
-
Notifications
You must be signed in to change notification settings - Fork 391
Add more features and demos in docs #2257
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
Changes from 2 commits
5029b67
e4a5399
cb348ff
9f308ee
1c8fc1a
fa9edc8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,64 @@ | ||
# Features | ||
|
||
- Code evaluation codelens ([Tutorial](https://github.com/haskell/haskell-language-server/tree/master/plugins/hls-eval-plugin/README.md)): | ||
- Warning and error diagnostics from GHC | ||
- Type information and documentation on hover, [including your own comments](#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 | ||
- Formatting via Brittany, Floskell, Fourmolu, Ormolu or Stylish Haskell | ||
- Code evaluation (Haskell Language Server), see ([Tutorial](https://github.com/haskell/haskell-language-server/blob/master/plugins/hls-eval-plugin/README.md)) | ||
|
||
 | ||
 | ||
|
||
- Type information and documentation on hover. Note that currently, in order for docs to be displayed for dependencies, they must have been built with GHC's `-haddock` flag: | ||
- Integration with [retrie](https://hackage.haskell.org/package/retrie) | ||
|
||
- For cabal: | ||
- Add to your global config file (e.g. `~/.cabal/config`): | ||
 | ||
|
||
``` | ||
program-default-options | ||
ghc-options: -haddock | ||
``` | ||
- Code lenses for explicit import lists | ||
|
||
- 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`: | ||
- 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) | ||
|
||
``` | ||
ghc-options: | ||
"$everything": -haddock | ||
``` | ||
 | ||
|
||
- Integration with [hlint](https://github.com/ndmitchell/hlint) to show diagnostics and apply hints via [apply-refact](https://github.com/mpickering/apply-refact) | ||
|
||
 | ||
|
||
- Module name suggestions for insertion or correction | ||
|
||
 | ||
|
||
This will cause compilation errors if a dependency contains invalid Haddock markup, though from GHC version 9.0, [these will be demoted to warnings](https://gitlab.haskell.org/ghc/ghc/-/merge_requests/2377). | ||
- Call hierarchy support | ||
|
||
- Integration with [retrie](https://hackage.haskell.org/package/retrie) | ||
 | ||
|
||
|
||
## How to show local documentation on hover | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This doesn't seem like it belongs in a "features" list per se? It's more like "setup instructions to get this feature to work". I'm not sure where that belongs, perhaps in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hmm yeah you are right, thanks for the suggestion There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done! |
||
|
||
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` | ||
|
||
- Code lenses for explicit import lists | ||
- For stack, add to global `$STACK_ROOT\config.yaml`, or project's `stack.yaml`: | ||
|
||
 | ||
```yaml | ||
ghc-options: | ||
'$everything': -haddock | ||
``` | ||
|
||
- Many more (TBD) | ||
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. |
Uh oh!
There was an error while loading. Please reload this page.