[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/haskell-ts-mode 5178ff240f 13/61: nl indent fix
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/haskell-ts-mode 5178ff240f 13/61: nl indent fix |
Date: |
Wed, 4 Sep 2024 04:00:27 -0400 (EDT) |
branch: elpa/haskell-ts-mode
commit 5178ff240f56a152a4419db85d7b7ca8e4557f7c
Author: Pranshu Sharma <pranshusharma366@gmail.com>
Commit: Pranshu Sharma <pranshusharma366@gmail.com>
nl indent fix
---
haskell.el | 24 +++++++++++-------------
1 file changed, 11 insertions(+), 13 deletions(-)
diff --git a/haskell.el b/haskell.el
index 6b594aa5f7..b39639d3bf 100644
--- a/haskell.el
+++ b/haskell.el
@@ -46,27 +46,28 @@
(setq haskell-ts-indent-rules
`((haskell
((node-is "comment") column-0 0)
- ((parent-is "haskell") column-0 0)
- ((parent-is "declarations") column-0 0)
((parent-is "imports") column-0 0)
;; If then else
((node-is "then") parent 2)
((node-is "^else$") parent 2)
- ;; lists
((node-is "^in$") parent 2)
((parent-is "apply") parent 2)
+
;; Match
((match "match" nil nil 2 2) parent 2)
((node-is "match") prev-sibling 0)
+ ((parent-is "match") grand-parent 2)
+
+
;; Do Hg
((lambda (node parent bol)
(string= "do" (treesit-node-type (treesit-node-prev-sibling node))))
grand-parent 0)
((parent-is "do") prev-sibling 0)
-
+
((node-is "alternatives") grand-parent 0)
((parent-is "alternatives") grand-parent 2)
@@ -75,7 +76,7 @@
((parent-is "infix") parent 0)
((parent-is "data_constructors") parent 0)
-
+
;; where
((lambda (node parent bol)
(string= "where" (treesit-node-type (treesit-node-prev-sibling
node))))
@@ -85,13 +86,10 @@
((parent-is "local_binds") prev-sibling 0)
((node-is "^where$") parent 2)
- ;; Backup
- ((lambda (a b c)
- (save-excursion
- (goto-char c)
- (message "ee")
- (re-search-forward "^[ \t]*$" (line-end-position) t)))
- prev-adaptive-prefix 0))))
+ (no-node prev-adaptive-prefix 0)
+ ((parent-is "haskell") column-0 0)
+ ((parent-is "declarations") column-0 0)
+ )))
;;;###autoload
@@ -163,4 +161,4 @@
(define-key haskell-ts-mode-map (kbd "C-c c") 'haskell-compile-region-and-go)
(define-key haskell-ts-mode-map (kbd "C-c r") 'run-haskell)
-(add-to-list 'auto-mode-alist '("\\.hs\\'" . haskell-ts-mode))
+;; (add-to-list 'auto-mode-alist '("\\.hs\\'" . haskell-ts-mode))
- [nongnu] elpa/haskell-ts-mode ebc222940f 24/61: typo, (continued)
- [nongnu] elpa/haskell-ts-mode ebc222940f 24/61: typo, ELPA Syncer, 2024/09/04
- [nongnu] elpa/haskell-ts-mode edc4f1dfc9 31/61: quasi quote body no indent, ELPA Syncer, 2024/09/04
- [nongnu] elpa/haskell-ts-mode 6a3c2d27e9 52/61: fixed electric pair, ELPA Syncer, 2024/09/04
- [nongnu] elpa/haskell-ts-mode c0fe26d991 53/61: fixed defgroup error, ELPA Syncer, 2024/09/04
- [nongnu] elpa/haskell-ts-mode 1c017f310e 07/61: at, ELPA Syncer, 2024/09/04
- [nongnu] elpa/haskell-ts-mode 78b685d6ea 01/61: first commit, ELPA Syncer, 2024/09/04
- [nongnu] elpa/haskell-ts-mode cc627feca3 05/61: added 'instance' to be highlighted, ELPA Syncer, 2024/09/04
- [nongnu] elpa/haskell-ts-mode a0fbb19e80 18/61: Added installation instructions, ELPA Syncer, 2024/09/04
- [nongnu] elpa/haskell-ts-mode 38595a001e 12/61: Major indent fixes, ELPA Syncer, 2024/09/04
- [nongnu] elpa/haskell-ts-mode 00a397204d 32/61: Major changed, to indentation, font lock, ELPA Syncer, 2024/09/04
- [nongnu] elpa/haskell-ts-mode 5178ff240f 13/61: nl indent fix,
ELPA Syncer <=
- [nongnu] elpa/haskell-ts-mode 98660f4cce 28/61: Major changes to comment and indent, ELPA Syncer, 2024/09/04
- [nongnu] elpa/haskell-ts-mode b6426584ca 15/61: Major updates, ELPA Syncer, 2024/09/04
- [nongnu] elpa/haskell-ts-mode 3e2e2aa769 14/61: fix comment, ELPA Syncer, 2024/09/04
- [nongnu] elpa/haskell-ts-mode 155bf79867 33/61: more indent fixes, ELPA Syncer, 2024/09/04
- [nongnu] elpa/haskell-ts-mode 113e443752 26/61: Fix quasiquotes, ELPA Syncer, 2024/09/04
- [nongnu] elpa/haskell-ts-mode 9c032dc8c4 44/61: Better formating and general code quality changes, ELPA Syncer, 2024/09/04
- [nongnu] elpa/haskell-ts-mode 1525dc1dc7 06/61: ic, ELPA Syncer, 2024/09/04
- [nongnu] elpa/haskell-ts-mode 020175db62 16/61: Major changes, ELPA Syncer, 2024/09/04
- [nongnu] elpa/haskell-ts-mode 9f450166d8 39/61: better docu, ELPA Syncer, 2024/09/04
- [nongnu] elpa/haskell-ts-mode 02f280400c 34/61: Added eglot supprt, ELPA Syncer, 2024/09/04