[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/haskell-ts-mode 739415d37d 1/8: Indent fixes(just for cons
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/haskell-ts-mode 739415d37d 1/8: Indent fixes(just for consistancy) |
Date: |
Mon, 16 Sep 2024 10:00:12 -0400 (EDT) |
branch: elpa/haskell-ts-mode
commit 739415d37d0fb5e737aca29c5158cbbe4ac9a18e
Author: pranshu sharma <pranshu@pebl>
Commit: pranshu sharma <pranshu@pebl>
Indent fixes(just for consistancy)
---
haskell-ts-mode.el | 31 +++++++------------------------
1 file changed, 7 insertions(+), 24 deletions(-)
diff --git a/haskell-ts-mode.el b/haskell-ts-mode.el
index 8d172973c5..b0fbfea7d2 100644
--- a/haskell-ts-mode.el
+++ b/haskell-ts-mode.el
@@ -178,9 +178,10 @@
(setq n (if arg (treesit-node-prev-sibling n)
(treesit-node-next-sibling n))))
(if n
- (treesit-node-start n) nil))))
+ n nil))))
(p-prev-sib
- (lambda (node _ _) (funcall p-sib node t))))
+ (lambda (node _ _) (treesit-node-start (funcall p-sib node t))))
+ (p-n-prev (lambda (node) (funcall p-sib node t))))
`((haskell
((node-is "comment")
;; Indenting comments by priorites:
@@ -190,7 +191,7 @@
;; (relevent means type not it haskell-ts--ignore-types)
(lambda (node parent _)
(if-let ((next-sib (funcall ,p-sib node t)))
- next-sib
+ (treesit-node-start next-sib)
(if-let ((prev-sib (funcall ,p-prev-sib node nil nil)))
prev-sib
(treesit-node-start parent))))
@@ -261,28 +262,10 @@
;; Match
((lambda (node _ _)
- (and (string= (treesit-node-type node) "match")
- (let ((pos 3)
- (n node))
- (while (and (not (null n))
- (not (eq pos 0)))
- (setq n (treesit-node-prev-sibling n))
- (unless (string= "comment" (treesit-node-type n))
- (setq pos (- pos 1))))
- (and (null n) (eq pos 0)))))
+ (and (string= "match" (treesit-node-type node))
+ (string= "variable" (treesit-node-type (funcall ,p-n-prev
node)))))
parent 1)
- ((lambda (node _ _)
- (and (string= (treesit-node-type node) "match")
- (let ((pos 4)
- (n node))
- (while (and (not (null n))
- (not (eq pos 0)))
- (setq n (treesit-node-prev-sibling n))
- (unless (string= "comment" (treesit-node-type n))
- (setq pos (- pos 1))))
- (eq pos 0))))
- ,p-prev-sib 0)
- ((parent-is "match") standalone-parent 2)
+ ((node-is "match") ,p-prev-sib 0)
((parent-is "haskell") column-0 0)
((parent-is "declarations") column-0 0)
- [nongnu] elpa/haskell-ts-mode updated (bf632cba27 -> 575748b9a5), ELPA Syncer, 2024/09/16
- [nongnu] elpa/haskell-ts-mode ef35522e99 5/8: Fixed indent for (parent-is "match") scinario, ELPA Syncer, 2024/09/16
- [nongnu] elpa/haskell-ts-mode 739415d37d 1/8: Indent fixes(just for consistancy),
ELPA Syncer <=
- [nongnu] elpa/haskell-ts-mode 59b146204b 6/8: Fixed indent of ']', ELPA Syncer, 2024/09/16
- [nongnu] elpa/haskell-ts-mode 2280feefe6 3/8: Comment fixed, ELPA Syncer, 2024/09/16
- [nongnu] elpa/haskell-ts-mode 575748b9a5 8/8: Indent changes to comment, case, infix, ELPA Syncer, 2024/09/16
- [nongnu] elpa/haskell-ts-mode a2b07815bc 2/8: shortening statmenet, ELPA Syncer, 2024/09/16
- [nongnu] elpa/haskell-ts-mode cf0c9c308c 4/8: Changed indentation of infix, ELPA Syncer, 2024/09/16
- [nongnu] elpa/haskell-ts-mode eea9607a42 7/8: Forgot defvar + indent of case fixed, ELPA Syncer, 2024/09/16