[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/haskell-tng-mode d1e599a 285/385: switch formatting backen
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/haskell-tng-mode d1e599a 285/385: switch formatting backend based on project config |
Date: |
Tue, 5 Oct 2021 23:59:49 -0400 (EDT) |
branch: elpa/haskell-tng-mode
commit d1e599a9c221eb9c77eee15d248b976984a52cd3
Author: Tseen She <ts33n.sh3@gmail.com>
Commit: Tseen She <ts33n.sh3@gmail.com>
switch formatting backend based on project config
---
README.md | 9 +++++----
haskell-tng-extra-stack.el | 2 +-
haskell-tng-extra.el | 8 ++++++++
3 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/README.md b/README.md
index b355e60..ad03848 100644
--- a/README.md
+++ b/README.md
@@ -75,16 +75,17 @@ To find out which module a symbol belongs to, use `M-x
haskell-tng-fqn-at-point`
To automatically import a symbol at point, use `M-x
haskell-tng-import-symbol-at-point`.
-## Contrib
+## Extras
Integrations are provided for common libraries and external applications.
The installation instructions above enable all the integrations. Remove the
`require` lines for packages that are unwanted.
-Third party Haskell tools must be installed separately (e.g. via `cabal
v2-install`) for:
+Third party Haskell tools must be installed separately (e.g. via `cabal
v2-install`):
-- `C-c C` invoke
[`stack2cabal`](https://hackage.haskell.org/package/stack2cabal)
-- `C-c C-r f` invoke
[`stylish-haskell`](https://hackage.haskell.org/package/stylish-haskell)
+- [`stack2cabal`](https://hackage.haskell.org/package/stack2cabal)
+- [`stylish-haskell`](https://hackage.haskell.org/package/stylish-haskell)
+- [`ormolu`](https://github.com/tweag/ormolu)
- `C-c p R` invoke
[`fast-tags`](https://hackage.haskell.org/package/fast-tags) via
[`projectile`](https://github.com/bbatsov/projectile)
## Contributing
diff --git a/haskell-tng-extra-stack.el b/haskell-tng-extra-stack.el
index 40562fa..1d67fd0 100644
--- a/haskell-tng-extra-stack.el
+++ b/haskell-tng-extra-stack.el
@@ -10,7 +10,7 @@
;;; Code:
;; TODO document
-;; FIXME implement
+;; TODO implement
(provide 'haskell-tng-extra-stack)
;;; haskell-tng-extra-stack.el ends here
diff --git a/haskell-tng-extra.el b/haskell-tng-extra.el
index 5f7d5ac..a031996 100644
--- a/haskell-tng-extra.el
+++ b/haskell-tng-extra.el
@@ -54,6 +54,14 @@ When in a comment and called with a prefix, the comment will
be completed."
(insert rem)))))
;;;###autoload
+(defun haskell-tng-format ()
+ "Uses stylish-haskell if there is a config file, falling back to ormolu."
+ (interactive)
+ (if (locate-dominating-file default-directory ".stylish-haskell.yaml")
+ (haskell-tng-stylish-haskell)
+ (haskell-tng-ormolu)))
+
+;;;###autoload
(defun haskell-tng-stylish-haskell ()
"Apply `stylish-haskell' rules."
;; TODO use https://github.com/purcell/reformatter.el
- [nongnu] elpa/haskell-tng-mode 4b598b2 377/385: third party tools use project specific PATH, (continued)
- [nongnu] elpa/haskell-tng-mode 4b598b2 377/385: third party tools use project specific PATH, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode aaf7c55 370/385: support for hsinspect-lsp, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode b3e6c9a 113/385: compilation mode regression tests vs haskell-mode, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 99a7f10 337/385: cleanup, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode e6d8761 343/385: local jump-to-definition should error, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode c31afdb 272/385: missing CPP case, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 85c4dd5 233/385: fix bugfix in goto-import, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 5c157fb 255/385: rigid ormolu support, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 64ec84d 260/385: if/then/else indentation, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 1d53572 243/385: bugfixes, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode d1e599a 285/385: switch formatting backend based on project config,
ELPA Syncer <=
- [nongnu] elpa/haskell-tng-mode fd06b8f 264/385: move haskell-tng-newline into the -extra package, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 8ff79e7 247/385: allow parallelism, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 4e2cf00 284/385: simplify the installation of hsinspect, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 1107e63 274/385: bump hsinspect, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 8475578 311/385: typos, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode f8d2b91 295/385: miss some false positive ghc errors, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode fca5c6e 315/385: better docs and cabal-install support, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode b2e19c9 318/385: document next steps, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode c39d0f4 321/385: some hsinspect tests, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 5fe4cb1 359/385: cleanup test includes, ELPA Syncer, 2021/10/06