mirror of
https://github.com/higherkindness/mu-haskell.git
synced 2024-09-11 14:36:01 +03:00
Update instructions about dev environment (#220)
This commit is contained in:
parent
c7cbe18dca
commit
202c3b7877
2
.vscode/extensions.json
vendored
2
.vscode/extensions.json
vendored
@ -2,7 +2,7 @@
|
||||
// See http://go.microsoft.com/fwlink/?LinkId=827846
|
||||
// for the documentation about the extensions.json format
|
||||
"recommendations": [
|
||||
"DigitalAssetHoldingsLLC.ghcide",
|
||||
"haskell.haskell",
|
||||
"hoovercj.haskell-linter",
|
||||
"vigoo.stylish-haskell",
|
||||
"EditorConfig.EditorConfig"
|
||||
|
@ -1,37 +1,23 @@
|
||||
# Development recommendations
|
||||
|
||||
Before continuing, make sure you've read:
|
||||
Most of our developers use using [Visual Studio Code](https://code.visualstudio.com/). In that case, you just have to open the project, and install the recommended extensions. Before continuing, make sure you've read:
|
||||
|
||||
- [Alejandro's post on setting up a Haskell development environment](https://www.47deg.com/blog/setting-up-haskell/).
|
||||
- [Alejandro's post on setting up a Haskell development environment](https://www.47deg.com/blog/setting-up-haskell/), but forget about the Visual Studio Code configuration outlined there.
|
||||
- [Kowainik's Haskell Style Guide](https://kowainik.github.io/posts/2019-02-06-style-guide).
|
||||
|
||||
## VSCode extensions
|
||||
## Visual Studio Code extensions
|
||||
|
||||
To make our lives easier while developing in Haskell, we use the following extensions:
|
||||
To make our lives easier while developing in Haskell, we use a set of recommended extensions. The first time you open the project, the editor should suggest to install all those you do not have,
|
||||
|
||||
- [ghcide](https://marketplace.visualstudio.com/items?itemName=DigitalAssetHoldingsLLC.ghcide), the best thing that happened to Haskell for editors/IDEs! ❤️
|
||||
- [Haskell](https://marketplace.visualstudio.com/items?itemName=haskell.haskell), the best thing that happened to Haskell for editors/IDEs! ❤️
|
||||
- [hlint](https://marketplace.visualstudio.com/items?itemName=hoovercj.haskell-linter), another great extension to have suggestions and refactors in Haskell 🛠
|
||||
- [stylish-haskell](https://marketplace.visualstudio.com/items?itemName=vigoo.stylish-haskell), the formatter we use to prettify the code 💅🏼
|
||||
- [editorconfig](https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig), to have consistency between different editors and envs 🐀
|
||||
|
||||
## stylish-haskell 💅🏼
|
||||
## Styling 💅🏼
|
||||
|
||||
Regarding the formatter, we use the `master` version of [stylish-haskell](https://github.com/jaspervdj/stylish-haskell) to be able to use language pragmas with lowercase, so you'll need to do this locally:
|
||||
We loosely follow [Kowainik's Haskell Style Guide](https://kowainik.github.io/posts/2019-02-06-style-guide). In order to automate styling, we use [stylish-haskell](https://github.com/jaspervdj/stylish-haskell), for which we provide a `.stylish-haskell.yaml` configuration file.
|
||||
|
||||
```sh
|
||||
$ git clone https://github.com/jaspervdj/stylish-haskell
|
||||
$ ...
|
||||
$ cd stylish-haskell && stack install
|
||||
```
|
||||
|
||||
We don't provide any git hook or tool that enforces our style. However, before you propose any PR please make sure to run `stylish-haskell` yourself, and to follow our style guide mentioned above to the extent possible. 😊
|
||||
|
||||
If you wan't to automate this for your VSCode, add the following to your `.vscode/settings.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"editor.formatOnSave": true
|
||||
}
|
||||
```
|
||||
We don't provide any git hook or tool that enforces our style. By default the provided `.vscode/settings.json` file runs styling on every save. However, before you propose any PR please make sure to run `stylish-haskell` yourself, and to follow our style guide mentioned above to the extent possible. 😊
|
||||
|
||||
Happy hacking! 👏🏼
|
||||
|
Loading…
Reference in New Issue
Block a user