在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):mihaimaruseac/hindent开源软件地址(OpenSource Url):https://github.com/mihaimaruseac/hindent开源编程语言(OpenSource Language):Haskell 87.4%开源软件介绍(OpenSource Introduction):hindentHaskell pretty printer Install
Usage
hindent is used in a pipeline style
The default indentation size is
CustomizationCreate a indent-size: 2
line-length: 80
force-trailing-newline: true
line-breaks: [":>", ":<|>"]
extensions:
- DataKinds
- GADTs
- TypeApplications By default, hindent preserves the newline or lack of newline in your input. With hindent can be forced to insert a newline before specific operators and tokens with Using It is also possible to specify which extensions HIndent runs
with in your extensions:
- MagicHash
- RecursiveDo EmacsIn
elisp/hindent.el
there is
To enable it, add the following to your init file: (add-to-list 'load-path "/path/to/hindent/elisp")
(require 'hindent)
(add-hook 'haskell-mode-hook #'hindent-mode) VimThe
Then you can format with hindent using Note that unlike in emacs you have to take care of selecting a sensible buffer region as input to hindent yourself. If that is too much trouble you can try vim-textobj-haskell which provides a text object for top level bindings. In order to format an entire source file execute:
Alternatively you could use the vim-hindent plugin which runs hindent automatically when a Haskell file is saved. AtomFortunately, you can use https://atom.io/packages/ide-haskell with the path to hindent specified instead of that to stylish-haskell. Works like a charm that way! IntelliJ / other JetBrains IDEs
Now whenever you save a file, |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论