[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/haskell-tng-mode 6a31b59 101/385: document the plan for in
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/haskell-tng-mode 6a31b59 101/385: document the plan for indentation |
Date: |
Tue, 5 Oct 2021 23:59:10 -0400 (EDT) |
branch: elpa/haskell-tng-mode
commit 6a31b591a28f3c62b1f6412dcb7add22fa408fd3
Author: Tseen She <ts33n.sh3@gmail.com>
Commit: Tseen She <ts33n.sh3@gmail.com>
document the plan for indentation
---
haskell-tng-smie.el | 29 ++++++++++++++++++++++++++---
1 file changed, 26 insertions(+), 3 deletions(-)
diff --git a/haskell-tng-smie.el b/haskell-tng-smie.el
index 5a887c7..df284b0 100644
--- a/haskell-tng-smie.el
+++ b/haskell-tng-smie.el
@@ -107,13 +107,36 @@
(defun haskell-tng-smie:indent-cycle ()
"Returns the next alternative indentation level from a ring."
(when (and
- (not (eq this-command #'newline-and-indent))
- (eq this-command last-command))
- ;; TODO invalidate the cycle
+ (eq this-command last-command)
+ ;; TODO allow users to define the blacklist, incase they have a custom
+ ;; newline+tab command.
+ (not (eq this-command #'newline-and-indent)))
+ ;; TODO invalidation of any caches
+ ;; TODO record the smie indent level (recursing like in stefan's code)
;; TODO implement
;; (message "CALLING INDENT CYCLE FROM %s" this-command)
2))
+;; (defun haskell-tng:smie-indent ()
+;; (cond
+;; ;; When we're not in the top-level call to smie-indent-calculate, so
just do
+;; ;; nothing and let the other rules do their job.
+;; (haskell-tng:smie-indent-nested-call nil)
+;; ;; When cycling, return the next indentation.
+;; ((eq this-command last-command)
+;; (haskell-tng:return-next-stashed-indentation-column))
+;; ;; When we're in the top-level call to smie-indent-calculate, take
control
+;; ;; and return a non-nil value to prevent the other rules from being used.
+;; (t
+;; (let ((haskell-tng:smie-indent-nested-call t)
+;; (n (haskell-tng:get-number-of-closing-braces-at-bol))
+;; (indentations ()))
+;; (dotimes (i n)
+;; (haskell-tng:tell-lexer-there-are-N-closing-braces-at-bol i)
+;; (push (smie-indent-calculate) indentations))
+;; (haskell-tng:stash-indentation-columns indentations)
+;; (haskell-tng:return-next-stashed-indentation-column)))))
+
(defun haskell-tng-smie:setup ()
(setq-local smie-indent-basic 2)
- [nongnu] elpa/haskell-tng-mode b59ce04 356/385: improve testing, (continued)
- [nongnu] elpa/haskell-tng-mode b59ce04 356/385: improve testing, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode ee1fb28 345/385: small cleanup, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 1310276 346/385: planning, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 09018bc 352/385: support hsinspect beta releases, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode e73bc19 335/385: jump-to-definition, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 2f2c500 354/385: defining a test spec, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 232baf8 362/385: less import suggestions, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode ab53433 375/385: reprioritise, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 2b9c6bf 369/385: support dev hsinspect, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 68d1d7c 371/385: bump hsinspect, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 6a31b59 101/385: document the plan for indentation,
ELPA Syncer <=
- [nongnu] elpa/haskell-tng-mode 9ec4841 104/385: meh indentation, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode ea46850 207/385: bugfix for compile vs runtime loading, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 63b1c8d 250/385: flip the default newline / comment behaviour, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 83458d6 253/385: reverting newline comment behaviour, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode f59c9ee 259/385: fix indentation of short type signatures, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode dbbe488 265/385: abbrevs don't fire in comments / strings, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode f56bd2a 256/385: prefer optimised hsinspect builds, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode e84970b 263/385: rename -contrib to -extra, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode af443a1 269/385: fix a name clash in the tests, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode cce466c 271/385: hsinspect now has a compiler plugin, ELPA Syncer, 2021/10/06