Skip to content

Commit 0a4d618

Browse files
committed
Guidelines for contributing code actions
1 parent da0379b commit 0a4d618

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

docs/contributing/contributing.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,15 @@ Alternatively, you can build the entire thing as a Nix derivation from the flake
252252

253253
The docs are also built and previewed on every PR, so you can check them from the PR status.
254254

255+
## Working on code actions
256+
257+
Here are some design guidelines to observe when adding or modifying code actions:
258+
259+
1. Prefer ghc-exactprint to manual text parsing.
260+
2. Prefer ghc-exactprint to manual code generation.
261+
3. Code generating actions should not try to format the generated code. Assume that the user is also leveraging HLS for automated code formatting.
262+
4. Put new code actions in their own plugin unless they are very closely aligned with an existing ghcide code action.
263+
255264
## Sponsorship
256265

257266
If you want to contribute financially you can do so via [open-collective](https://opencollective.com/haskell-language-server). In the past the funding has been used to sponsor [summer student projects](https://mpickering.github.io/ide/posts/2021-07-22-summer-of-hls.html).

0 commit comments

Comments
 (0)