Skip to content

Commit

Permalink
Notes: store line numbers on save
Browse files Browse the repository at this point in the history
  • Loading branch information
justinpombrio committed Dec 16, 2023
1 parent 1e70e3a commit 433c3e7
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions doc/line_numbers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Line Numbers

In some sense, line numbers aren't meaningful in Synless:

- For screen readers, there is literally no such thing as a line.
- The notation you display with may be very different from the notation printed. E.g. you could have
Rust displayed with indentation instead of braces, and Python displayed with braces instead of
indentation.

However, they are important when interfacing with the outside world. Thus we'll store them exactly
when doing so! Upon save, mark every node in the document with the _first_ line number it was
printed on. Display the line number for the current node in the status bar. You can jump to a node
by line.

0 comments on commit 433c3e7

Please sign in to comment.