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

    test: add indentation test file
---
 indentation-test.typ | 110 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 110 insertions(+)

diff --git a/indentation-test.typ b/indentation-test.typ
new file mode 100644
index 0000000000..c75b4e4e16
--- /dev/null
+++ b/indentation-test.typ
@@ -0,0 +1,110 @@
+// Note that some indentation bugs can only be found on real time inserting
+// Use `typst-ts/util/setup-indent-debug-environment' function in 
`side/utils.el'
+// you may also want to turn off `auto-visited-file-mode` or similar (for 
testing
+// end of buffer condition)
+
+// typst-ts-mode-indent-offset: 4
+
+#show: cv.with(
+    author: "",
+    [
+        emacs
+        eacs
+        emacs
+        emacs
+    ]
+)
+
+= El
+== Psy
+1. Kongaroo
+== ERROR indentation
+
+= Header 1
+stuff
+== Header 2
+stuff
+== Header 2
+- list
++ list
+    + list
+    2. list
+        - list \
+            El Psy Kongaroo
+            El Psy Kongaroo \
+            El Psy Kongaroo
+
+stuff
+=== Header 3
+stuffs
+stuffs
+
+= Raw Block
+```rust
+fn main() {
+    println!("El Psy Kongaroo");
+}
+```
+
+```rust
+  fn main() {
+
+  }
+  ``` // FIXME: should be 0 offset
+
+= Script
+#if 1 < 2 [
+    This is shown
+] else [
+    This is not
+]
+
+#let n = 2
+#while n < 10 {
+    n = (n * 2) - 1
+    (n,)
+}
+
+#for letter in "abc nope" {
+    if letter == " " {
+        break
+    }
+
+    letter
+}
+
+#(
+    "a, b, c"
+        .split(", ")
+        .join[ --- ]
+)
+
+= Math
+$
+    A = pi r^2
+$
+  
+#[
+    $
+        cal(A) := {
+            x in RR | x "is natural"
+        }
+    $
+]
+
+$
+    cal(A) :=
+    {
+        x in RR | x "is natural"
+    }
+$
+
+$ sum_(k=0)^n k
+    &= 1 + ... + n \
+    &= (n(n+1)) / 2 $
+
+$
+    sum_(k=0)^n k
+        &= 1 + ... + n \
+        &= (n(n+1)) / 2
+$

Reply via email to