summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-17 07:53:29 -0300
committerGabriel Schneider <[email protected]>2026-11-17 12:15:01 -0300
commit690c504391e07a0767df8255e288ffe39296af22 (patch)
tree162bf46bc8cae3f0cec46b58d3d3cc2ea558a7e3 /docs
parentdee94c740bdaea61ff35b4e0a7f1d2815c9ee441 (diff)
downloadpardes-690c504391e07a0767df8255e288ffe39296af22.tar.gz
pardes-690c504391e07a0767df8255e288ffe39296af22.zip
+39 -6 lib: a new line's indent comes from the parse handed in (docs/next-editor.md): in the library, edit.treeIndent reads normal.nodeTree, the caller's `Syntax`, and its `Language`'s indent query (`indents`, which addLanguage already kept and nothing read), as a file's Enter, `o` and `O` read its own tree; without a query, or without a parse, the plain indent as before (a level more after `(`, `[`, `{` or `)`), which pushed every line of a language whose lines end in a call one level further in (examples/live, the sketch's language); pardes's own panes compile the branch out; test/lib: `f(1)` and Enter with no parse, with a grammar and no indent query (both a level in) and with one (none); hxlib 538 of 658 with 0 mismatches, core-test 811 of 950, shell-test 990 of 993, hxdiff 658 with 0 mismatches, lib-test 11 of 11
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'docs')
-rw-r--r--docs/next-editor.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/next-editor.md b/docs/next-editor.md
index af0ee537..fdb656cb 100644
--- a/docs/next-editor.md
+++ b/docs/next-editor.md
@@ -42,8 +42,10 @@ history for Alt-i to go back by (the page allocator: it holds nothing of
the code that made it). With it, Alt-o, Alt-i, Alt-n, Alt-p, Alt-a,
Alt-I, Alt-e, Alt-b and `]f` and kin are the text's and run in the
library on pardes's own nodeSelect and objectJump, and `mif` and kin find
-the `Language`'s `textobjects`; with no `lang` they do nothing, as in a
-text without a grammar. Without `syn` they come back as actions (`mif`
+the `Language`'s `textobjects`, and Enter, `o` and `O` take a new line's
+indent from its `indents` as a file's does (edit.treeIndent: without one,
+the plain indent, a level more after `(`, `[`, `{` or `)`); with no `lang`
+they do nothing, as in a text without a grammar. Without `syn` they come back as actions (`mif`
does nothing). An argument, not a field of the value: the tree holds
pointers into the grammar's code, and an argument is the least code
(the context of the call carries it, `Editor.syntax`; no interface).
@@ -125,8 +127,6 @@ terminals, replicas, dumps. Macros and `.`: their log is keys.zig's (the
core's dispatcher) and recording replays through it; keeping them meant
moving it, more code than leaving them out. `n`/`N`: pardes decides
between the look ring, a query's places and the register, the core's.
-Tree indents: they read the file's tree through `fileTree`, not
-`nodeTree`; a new line's indent in the library is the plain one.
Alt-o's history across calls lives in the `Syntax`, so a caller that
makes one per call (a sketch's `update` sees only State) has Alt-i go to
the first child instead, as helix does with no history.