From 10d7f910e7b1cde3031ef27c851f9f7700d9b547 Mon Sep 17 00:00:00 2001 From: pommicket Date: Wed, 4 Jan 2023 13:34:07 -0500 Subject: type documentation --- development.md | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'development.md') 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 -- cgit v1.2.3