[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/haskell-tng-mode 444664d 257/385: special case indentation
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/haskell-tng-mode 444664d 257/385: special case indentation of visual line breaks |
Date: |
Tue, 5 Oct 2021 23:59:42 -0400 (EDT) |
branch: elpa/haskell-tng-mode
commit 444664d43893c677cffff09021ddd76b3663df5b
Author: Tseen She <ts33n.sh3@gmail.com>
Commit: Tseen She <ts33n.sh3@gmail.com>
special case indentation of visual line breaks
---
haskell-tng-smie.el | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/haskell-tng-smie.el b/haskell-tng-smie.el
index 37377b4..8f85057 100644
--- a/haskell-tng-smie.el
+++ b/haskell-tng-smie.el
@@ -51,10 +51,15 @@ When in a comment and called with a prefix, the comment
will be completed."
(delete-region (point) (line-end-position)))
;; TODO don't continue line comments if there is code before them
;;
- ;; TODO in-comment indent should observe | haddock markers
- (if alt
- (call-interactively #'newline-and-indent)
- (call-interactively #'comment-indent-new-line))
+ ;; TODO in-comment indent should observer but not repeat | haddock markers
+ (cond
+ (alt
+ (call-interactively #'newline-and-indent))
+ ((looking-back (rx (>= 3 "-")) (line-beginning-position))
+ ;; don't continue or indent visual line breaks
+ (call-interactively #'newline))
+ (t
+ (call-interactively #'comment-indent-new-line)))
(when rem
(save-excursion
(insert rem)))))
- [nongnu] elpa/haskell-tng-mode 8e4f438 184/385: don't continue indenting one liner types, (continued)
- [nongnu] elpa/haskell-tng-mode 8e4f438 184/385: don't continue indenting one liner types, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 5251477 186/385: thots, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 41f1ad5 191/385: document fast-tags, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 4ec6259 185/385: prefer the lexer, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 1475f31 196/385: workaround bad indentation at the end of files, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 4b0ab71 199/385: indent type signatures on separate lines, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 950d094 210/385: projectile is not core, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 2df165a 229/385: electric indent locally disabled only, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 56ee2aa 231/385: completions alpha, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 6e938d0 230/385: workaround cabal bug, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 444664d 257/385: special case indentation of visual line breaks,
ELPA Syncer <=
- [nongnu] elpa/haskell-tng-mode 487989b 241/385: skeleton for contrib-stack, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode cea8b23 240/385: proof of concept getting the ghcflags from cabal, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 6699829 277/385: cleaner fqns, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 0abe075 246/385: only create ghcflags for relative dirs, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 2cfae9e 276/385: bump hsinspect, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 949f857 242/385: support component directories, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 7ae3f46 244/385: more workarounds for hsinspect setup, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 494aef4 302/385: cache the results of hsinspect imports, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 598b372 288/385: typo, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode e0fd8f4 303/385: abstract the hsinspect caching logic, ELPA Syncer, 2021/10/06