branch: elpa/nix-mode
commit 79a3715c3da662d94dfab4083ecdc4ca522c03d6
Author: Jakub Piecuch <[email protected]>
Commit: Jakub Piecuch <[email protected]>

    Improve handling of 'in' after a hanging 'let'.
---
 nix-mode.el | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/nix-mode.el b/nix-mode.el
index afb3aa96c1..c08ca91e24 100644
--- a/nix-mode.el
+++ b/nix-mode.el
@@ -453,6 +453,10 @@ STRING-TYPE type of string based off of Emacs syntax table 
types"
        (nix-smie--indent-anchor))))
     (`(:after . ",")
      (smie-rule-parent tab-width))
+    (`(:before . "in")
+     (forward-word)
+     (smie-backward-sexp t)
+     (nix-smie--indent-anchor 0))
     (`(:before . ",")
      ;; The parent is either the enclosing "{" or some previous ",".
      ;; In both cases this is what we want to align to.

Reply via email to