branch: elpa/haskell-ts-mode
commit f8ebeec7c4af9869aa07fd213a66f4fdc47f0905
Author: Pranshu Sharma <pran...@bauherren.ovh>
Commit: Pranshu Sharma <pran...@bauherren.ovh>

    adding proper indentation for signatures
    
    Fix for bug 31.
---
 README.md          | 6 +-----
 haskell-ts-mode.el | 3 +++
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/README.md b/README.md
index b30138e6bb..b846f7d900 100644
--- a/README.md
+++ b/README.md
@@ -137,9 +137,5 @@ This will do stuff like prettify `forall` into `∀` and 
`elem` to `∈`.
 -   Support for M-x align, so that calling it will align all the 'equal'
     signs in a region.
 -   Imenu support for functions with multiple definitions.
--   **Proper indenting of multiline signatures**: the Tree-sitter grammar
-    does not flatten the signatures, but rather leaves them to the standard
-    infix interpretation. This makes indentation hard, as it will mean
-    the only way to check if the the signature node is an ancestor of
-    node at point is to perfom a recursive ascent.
+
 
diff --git a/haskell-ts-mode.el b/haskell-ts-mode.el
index b490ffe55c..185ce10c2e 100644
--- a/haskell-ts-mode.el
+++ b/haskell-ts-mode.el
@@ -363,6 +363,9 @@ when `haskell-ts-prettify-words' is non-nil.")
         0)
 
        ((node-is "|") parent 1)
+
+       ;; Signature
+       ((n-p-gp nil "function" "function\\|signature") parent -3)
        
        ;; Backup
        (catch-all parent 2))))

Reply via email to