Skip to content

Commit baaee98

Browse files
jneirapepeiborramergify[bot]
authored
Plugin in config files (#2166)
* Plugin in config files List the config files where a plugin should be added * Correct grammar Co-authored-by: Pepe Iborra <pepeiborra@gmail.com> Co-authored-by: Pepe Iborra <pepeiborra@gmail.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
1 parent 4947625 commit baaee98

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

docs/contributing/plugin-tutorial.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -381,13 +381,16 @@ generateLens pId uri minImports (L src imp)
381381

382382
## Wrapping up
383383

384-
There's only one code change left to do at this point: "link" the plugin in the `Main` HLS module.
384+
There's only one haskell code change left to do at this point: "link" the plugin in the `Main` HLS module.
385+
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:
386+
- `./cabal*.project` and `./stack*.yaml`: add the plugin package in the `packages` field
387+
- `./haskell-language-server.cabal`: add a conditional block with the plugin package dependency
388+
- `./.github/workflows/test.yml`: add a block to run the test suite of the plugin
389+
- `./.github/workflows/hackage.yml`: add the plugin to the component list to release the plugin package to hackage
390+
- `./*.nix`: add the plugin to nix builds
385391

386392
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)
387393

388394
I hope this has given you a taste of how easy and joyful it is to write plugins for HLS.
389395
If you are looking for ideas for contributing, here are some cool ones found in the HLS issue tracker:
390-
- [#205](https://github.com/haskell/haskell-language-server/issues/205) Integrate code synthesis tools (djinn, hoogle+)
391-
- [#258](https://github.com/haskell/haskell-language-server/issues/258) Integration with [Stan](https://github.com/kowainik/stan)
392-
- [#282](https://github.com/haskell/haskell-language-server/issues/282) High-level refactorings (rename, move, extract)
393-
- [#323](https://github.com/haskell/haskell-language-server/issues/323) Case splitting
396+
- https://github.com/haskell/haskell-language-server/issues?q=is%3Aopen+is%3Aissue+label%3A%22type%3A+possible+new+plugin%22

0 commit comments

Comments
 (0)