[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/indent-bars 945418c86d 112/431: current-indentation-dep
From: |
ELPA Syncer |
Subject: |
[elpa] externals/indent-bars 945418c86d 112/431: current-indentation-depth: fallback to naive indent |
Date: |
Mon, 16 Sep 2024 12:59:19 -0400 (EDT) |
branch: externals/indent-bars
commit 945418c86d3f1259e7883fc44d0b4c51788e3e30
Author: JD Smith <93749+jdtsmith@users.noreply.github.com>
Commit: JD Smith <93749+jdtsmith@users.noreply.github.com>
current-indentation-depth: fallback to naive indent
if the context nodes are not identified
---
indent-bars.el | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/indent-bars.el b/indent-bars.el
index 0374e81e3b..a7b9712b6f 100644
--- a/indent-bars.el
+++ b/indent-bars.el
@@ -740,13 +740,14 @@ starting line's depth."
(p (point)))
(when-let (((/= p (point-min)))
(node (treesit-node-on (1- p) p indent-bars--ts-lang)))
- (if (and indent-bars-no-descend-string
- (string= (treesit-node-type node) indent-bars--string-content))
- (min d (1+ (/ (indent-bars--indent-at-node node)
indent-bars-spacing)))
- (if-let ((indent-bars--ts-node-types)
- (ctx (treesit-parent-until node
#'indent-bars--treesit-node-match t)))
- (min d (1+ (/ (indent-bars--indent-at-node ctx)
indent-bars-spacing)))
- d)))))
+ (or
+ (if (and indent-bars-no-descend-string
+ (string= (treesit-node-type node) indent-bars--string-content))
+ (min d (1+ (/ (indent-bars--indent-at-node node)
indent-bars-spacing)))
+ (if-let ((indent-bars--ts-node-types)
+ (ctx (treesit-parent-until node
#'indent-bars--treesit-node-match t)))
+ (min d (1+ (/ (indent-bars--indent-at-node ctx)
indent-bars-spacing)))))
+ d))))
;;;; No stipple (e.g. terminal)
(defvar indent-bars--no-stipple-chars nil)
@@ -831,7 +832,7 @@ indicated, even if otherwise they would be."
(indent-bars--current-indentation-depth)))))
0)
(goto-char beg)
- (while (<= (point) (1- end)) ;note: end extends 1 char beyond blank
line range
+ (while (<= (point) (1- end)) ;note: end extends 1 char beyond blank
line range
(let* ((bp (line-beginning-position))
(ep (line-end-position))
(len (- ep bp))
- [elpa] externals/indent-bars 1cd0c30ba3 049/431: Tweaks to README.md, (continued)
- [elpa] externals/indent-bars 1cd0c30ba3 049/431: Tweaks to README.md, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 628d42f204 072/431: Defer setup when running under daemon and remove from README, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 568ec43b0e 109/431: Correct quote in docstring to silence compiler, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 90e5616e8b 117/431: Handle tree-sitter configured but not available in buffer, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 57183c26e6 114/431: highlight-current-depth: guard against missing current-depth, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 9d225884fc 104/431: Improve blend commentary for current depth color, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 7e28454459 076/431: include final newline to ensure full blank line regions match, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars c4495d8bf3 099/431: Re-organize stipple, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars d59d94d622 088/431: 2nd attempt defer setup when running under daemon, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 44621a1a9b 087/431: Revert "Defer setup when running under daemon and remove from README", ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 945418c86d 112/431: current-indentation-depth: fallback to naive indent,
ELPA Syncer <=
- [elpa] externals/indent-bars 929a5e2445 129/431: Major re-factoring of bar display: tabs, offset, and invent, more, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 529854ec34 170/431: Relocate :weight spec to indent-bars-stipple face, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars bce0b729cc 130/431: Comment treesit, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars d9459a784e 160/431: treesit improvements: always search from root node, add start-only, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars bbdbbfe4da 159/431: Mention Carbon in versoin for emacs-mac, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 35bade62bd 179/431: do not use derived-mode-class, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 78ddecc3a8 153/431: protect display with save-excursion, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 6f886f89c4 141/431: Support go-mode in addition to go-ts-mode, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 3c83532f98 182/431: Bump version, ELPA Syncer, 2024/09/16
- [elpa] externals/indent-bars 1875deadb7 166/431: Report TS string query error, ELPA Syncer, 2024/09/16