Skip to content

Commit 03b34d3

Browse files
authored
Add HLS as a way for editor integration
1 parent 8f8034c commit 03b34d3

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

README.markdown

+18-4
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,21 @@ data Foo a
158158
deriving (ToJSON) via Bar Foo
159159
```
160160

161-
## VIM integration
161+
## Editor integration
162+
163+
### Haskell Language Server
164+
[Haskell Language Server(HLS)][HLS] includes a [plugin][HLS stylish-haskell Plugin]
165+
for stylish-haskell. By changing the formatting provider option
166+
(`haskell.formattingProvider`) to `stylish-haskell` as described in
167+
[HLS options][HLS option], any editors that support [Language Server Protocol][LSP]
168+
can use stylish-haskell for formatting.
169+
170+
[HLS]: https://github.com/haskell/haskell-language-server
171+
[HLS option]: https://github.com/haskell/haskell-language-server#language-specific-server-options
172+
[HLS stylish-haskell Plugin]: https://github.com/haskell/haskell-language-server/blob/master/plugins/default/src/Ide/Plugin/StylishHaskell.hs
173+
[LSP]: https://microsoft.github.io/language-server-protocol/
174+
175+
### VIM integration
162176

163177
Since it works as a filter it is pretty easy to integrate this with VIM.
164178

@@ -192,7 +206,7 @@ Haskell file:
192206
[vim-stylish-haskell]: https://github.com/nbouscal/vim-stylish-haskell
193207
[vim-stylishask]: https://github.com/alx741/vim-stylishask
194208
195-
## Emacs integration
209+
### Emacs integration
196210
197211
[haskell-mode] for Emacs supports `stylish-haskell`. For configuration,
198212
see [the “Using external formatters” section][haskell-mode/format] of the
@@ -201,7 +215,7 @@ haskell-mode manual.
201215
[haskell-mode]: https://github.com/haskell/haskell-mode
202216
[haskell-mode/format]: http://haskell.github.io/haskell-mode/manual/latest/Autoformating.html
203217
204-
## Atom integration
218+
### Atom integration
205219
206220
[ide-haskell] for Atom supports `stylish-haskell`.
207221
@@ -210,7 +224,7 @@ haskell-mode manual.
210224
[ide-haskell]: https://atom.io/packages/ide-haskell
211225
[atom-beautify]: Https://atom.io/packages/atom-beautify
212226
213-
## Visual Studio Code integration
227+
### Visual Studio Code integration
214228
215229
[stylish-haskell-vscode] for VSCode supports `stylish-haskell`.
216230

0 commit comments

Comments
 (0)