From 92b4ec1f99a560f365cff7f718e4f2eb5bad4069 Mon Sep 17 00:00:00 2001 From: bendo Date: Sat, 8 Oct 2022 17:10:00 +0200 Subject: [PATCH] Fix typos in documentation --- docs/contributing/contributing.md | 2 +- docs/contributing/plugin-tutorial.md | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/docs/contributing/contributing.md b/docs/contributing/contributing.md index 544c278a6c..0903b1bf31 100644 --- a/docs/contributing/contributing.md +++ b/docs/contributing/contributing.md @@ -196,7 +196,7 @@ See the [tutorial](./plugin-tutorial.md) on writing a plugin in HLS. When ghcide is built with the `ekg` flag, HLS opens a metrics server on port 8999 exposing GC and ghcide metrics. The ghcide metrics currently exposed are: -- `ghcide.values_count`- count of build results in the store +- `ghcide.values_count` - count of build results in the store - `ghcide.database_count` - count of build keys in the store (these two would be the same in the absence of GC) - `ghcide.build_count` - build count. A key is GC'ed if it is dirty and older than 100 builds - `ghcide.dirty_keys_count` - non transitive count of dirty build keys diff --git a/docs/contributing/plugin-tutorial.md b/docs/contributing/plugin-tutorial.md index e397d9fddc..442bb47041 100644 --- a/docs/contributing/plugin-tutorial.md +++ b/docs/contributing/plugin-tutorial.md @@ -89,14 +89,14 @@ Plugins are "linked" in the `HlsPlugins` module, so we will need to add our plug idePlugins = pluginDescToIdePlugins allPlugins where allPlugins = - [ GhcIde.descriptor "ghcide" - , Pragmas.descriptor "pragmas" + [ GhcIde.descriptor "ghcide" + , Pragmas.descriptor "pragmas" , Floskell.descriptor "floskell" , Fourmolu.descriptor "fourmolu" - , Ormolu.descriptor "ormolu" + , Ormolu.descriptor "ormolu" , StylishHaskell.descriptor "stylish-haskell" , Retrie.descriptor "retrie" - , Brittany.descriptor "brittany" + , Brittany.descriptor "brittany" , Eval.descriptor "eval" ] ``` @@ -271,7 +271,7 @@ runImportCommand _lspFuncs _state (ImportCommandParams edit) = do The code lens provider implements all the steps of the algorithm described earlier: -> 1. Request the type checking artefacts from the ghcide subsystem +> 1. Request the type checking artefacts from the ghcide subsystem > 2. Extract the actual import lists from the type checked AST, > 3. Ask GHC to produce the minimal import lists for this AST, > 4. For every import statement without a explicit import list, find out what's the minimal import list, and produce a code lens to display it together with a diff to graft the import list in. @@ -392,5 +392,4 @@ However integrating the plugin in haskell-language-server itself will need some The full code as used in this tutorial, including imports, can be found in [this Gist](https://gist.github.com/pepeiborra/49b872b2e9ad112f61a3220cdb7db967) as well as in this [branch](https://github.com/pepeiborra/ide/blob/imports-lens/src/Ide/Plugin/ImportLens.hs) I hope this has given you a taste of how easy and joyful it is to write plugins for HLS. -If you are looking for ideas for contributing, here are some cool ones found in the HLS issue tracker: -- https://github.com/haskell/haskell-language-server/issues?q=is%3Aopen+is%3Aissue+label%3A%22type%3A+possible+new+plugin%22 +If you are looking for ideas for contributing, here are some cool ones found in the HLS [issue tracker](https://github.com/haskell/haskell-language-server/issues?q=is%3Aopen+is%3Aissue+label%3A%22type%3A+possible+new+plugin%22).