branch: elpa/typst-ts-mode
commit 1a3126f6b146e94fd5518ec7ed9df36b6c3c8a37
Author: Meow King <mr.meowk...@anche.no>
Commit: Meow King <mr.meowk...@anche.no>

    fix(indentation): inside ERROR
---
 typst-ts-mode.el | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/typst-ts-mode.el b/typst-ts-mode.el
index eec10dff33..6df6844ac6 100644
--- a/typst-ts-mode.el
+++ b/typst-ts-mode.el
@@ -853,6 +853,7 @@ Used in `typst-ts-mode-indent-rules'."
      ;;    nil)
      ;;  parent-bol 0)
      
+     ((and no-node (parent-is "source_file")) prev-line 0)
      ((parent-is "source_file") column-0 0)
 
      ((n-p-gp ,(regexp-opt '(")" "]" "}" "$"))
@@ -909,6 +910,8 @@ Used in `typst-ts-mode-indent-rules'."
 
      (no-node parent-bol 0)
 
+     ((parent-is "ERROR") no-indent 0)
+
      ;; example: (item (text) (text) (text)) when `(text)' is in different line
      (catch-all prev-line 0)))
   "Tree-sitter indent rules for `rust-ts-mode'.")

Reply via email to