summaryrefslogtreecommitdiff
path: root/development.md
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-01-04 13:34:07 -0500
committerpommicket <pommicket@gmail.com>2023-01-04 13:34:07 -0500
commit10d7f910e7b1cde3031ef27c851f9f7700d9b547 (patch)
treeee3f256e5a3b90da0bf02fec789bb88d74eeb1d1 /development.md
parent72a683768566a102d8aa40af17b36e16128b4ab6 (diff)
type documentation
Diffstat (limited to 'development.md')
-rw-r--r--development.md9
1 files changed, 9 insertions, 0 deletions
diff --git a/development.md b/development.md
index 7193bfa..f983d39 100644
--- a/development.md
+++ b/development.md
@@ -21,6 +21,15 @@ in `util.c` even if they use OS-specific library functions.)
## Adding languages
+## Syntax highlighting
+
+Obviously we don't want to re-highlight the whole file every time a change is made.
+Ideally, we would just re-highlight the line that was edited, but that might
+not work, because some syntax highlighting (e.g. multi-line comments) spans multiple lines.
+So we keep track of a "syntax state" for the start of each line (whether we're in a multi-line comment or not,
+whether we're in a multi-line string or not, etc.). A line's syntax highlighting can only change
+if it is edited, or if its syntax state changes.
+
## Adding LSP features
## Releasing