[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/indent-bars 34cecb96a4 358/431: Simplify developer note
From: |
ELPA Syncer |
Subject: |
[elpa] externals/indent-bars 34cecb96a4 358/431: Simplify developer note description for new simple font-lock method |
Date: |
Mon, 16 Sep 2024 12:59:49 -0400 (EDT) |
branch: externals/indent-bars
commit 34cecb96a4a12cf03a22e938484e115f2450b221
Author: JD Smith <93749+jdtsmith@users.noreply.github.com>
Commit: JD Smith <93749+jdtsmith@users.noreply.github.com>
Simplify developer note description for new simple font-lock method
---
indent-bars-ts.el | 38 ++++++++++++--------------------------
1 file changed, 12 insertions(+), 26 deletions(-)
diff --git a/indent-bars-ts.el b/indent-bars-ts.el
index fb5761b994..7e71c97334 100644
--- a/indent-bars-ts.el
+++ b/indent-bars-ts.el
@@ -21,40 +21,26 @@
;; beginning of the line). The scope highlight capability depends on
;; the position of the point, and so requires some subtle interface
;; between movement, tree-sitter, and font-lock. At any given point
-;; there is a scope range (pair of markers) which determines how the
-;; bars get displayed. Small movements can change the scope.
+;; there is a scope range (a pair of markers) which determines how the
+;; bars get displayed. Small movements can change the scope
+;; signficantly.
;;
;; The technique is as follows:
;;
;; - A post-command hook sets up an idle-time callback if none exists.
-;; - In idle time, this checks for changes to the associated buffer
-;; or position of point.
-;; - If either of these has changed, they are saved, and tree-sitter
-;; is queried for the innermost "scope" node configured for the
-;; buffer's language. Short nodes occupying too-few lines are not
-;; considered. A nil scope node indicates the entire file is the
-;; scope.
-;; - Font-lock operations occur on an "extended window", which is the
-;; current window bounds +- 50%.
-;; - If the scope node's bounds have not changed from their last
-;; stored (marker) values (modulo insertions/deletions), and the
-;; prior extended window fully encloses the the current window
-;; bounds, no update is needed.
-;; - If either the node has changed, or it has not changed, but its
-;; prior extended window bounds have been breached, mask
-;; (intersect) the new scope node with the extended window:
-;; - Store the new masked node range.
-;; - Compute the union of the new and old masked node range bounds,
-;; and flush font-lock over the associated region(s): typically
-;; just a few tens of lines each.
+;; - In idle time, check for the innermost "scope" node at point.
+;; - If the node boundaries have changed from the last time they were
+;; saved (modulo insertion deletion changes markers can track),
+;; invalidate font-lock over the node's boundaries.
+;; - Short nodes occupying too-few lines are not considered. A nil
+;; scope node indicates the entire file is the scope.
;; - Font-lock automatically re-applies indentation bars, consulting
-;; the saved masked node range to determine whether a given line is
+;; the saved node range to determine whether a given line is
;; in-scope or out-of-scope.
;;
;;
-;; Note the shorthand substitutions for
-;; style related prefixes (slot accessors and variables); see
-;; file-local-variables at the end:
+;; Note the shorthand substitutions for style related prefixes (slot
+;; accessors and variables); see file-local-variables at the end:
;;
;; ibts/ => indent-bars-ts-scope- (slot accessors)
;; ibtcs => indent-bars-ts-current-scope (scope struct)
- [elpa] externals/indent-bars c516788fe3 362/431: Update README.md, (continued)
- [elpa] externals/indent-bars c516788fe3 362/431: Update README.md, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 2d88129b2a 327/431: Add small menu to README.md, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 8826105182 342/431: Update README.md, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 88010c2724 387/431: Initial efforts towards font-lock-free/managing bars, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars f64e33bf37 325/431: correctly test style tag string with #'equal, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars d84c654c22 320/431: Update README.md, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars c6dab3309c 365/431: Remove superfluous :group from customs, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 6677c94823 352/431: use end marker for invalid range(s), ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars f7fb81c0d8 353/431: Major scope simplification: just invalid old ∪ new, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars f986762207 328/431: Update README.md, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 34cecb96a4 358/431: Simplify developer note description for new simple font-lock method,
ELPA Syncer <=
- [elpa] externals/indent-bars adfab4df1e 359/431: styling-scope: new option to invert -ts- variable to apply in-scope, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars bcc1e69e1d 364/431: reset: leave indent-bars--styles alone for teardown, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 4c1b2d46e9 367/431: introduce ts-minor-mode for simplified setup, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 2d4dab01c6 377/431: Update README.md, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 5a3346b68c 386/431: Remove invalid-ranges, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 6f429915ad 369/431: Bump version, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 48d6b40489 405/431: README: tweak ts-language tip, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars c8376cf437 416/431: Stipple compatibility update, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 1a88168837 389/431: indent-bars: refine jit-lock and extend region, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 76875aef81 401/431: slightly tweak main bar pattern and blend, ELPA Syncer, 2024/09/16