Skip to content

Commit 5f89c48

Browse files
authored
Add tree-sitter-mode lighter (#231)
Add new, customizable, variable tree-sitter-mode-lighter. It lets the user to customize tree-sitter-mode lighter in mode-line and disable it by setting it to an empty string.
1 parent 100dad5 commit 5f89c48

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lisp/tree-sitter.el

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ Use this to enable other minor modes that depends on the syntax tree."
5656
:type '(alist :key-type symbol
5757
:value-type symbol))
5858

59+
(defcustom tree-sitter-mode-lighter " tree-sitter"
60+
"Lighter for command `tree-sitter-mode'."
61+
:group 'tree-sitter
62+
:type '(string :tag "Lighter"))
63+
5964
(defvar-local tree-sitter-tree nil
6065
"Tree-sitter syntax tree.")
6166

@@ -185,7 +190,7 @@ signal an error."
185190
(define-minor-mode tree-sitter-mode
186191
"Minor mode that keeps an up-to-date syntax tree using incremental parsing."
187192
:init-value nil
188-
:lighter " tree-sitter"
193+
:lighter tree-sitter-mode-lighter
189194
:after-hook (when tree-sitter-mode
190195
(unless tree-sitter-tree
191196
(tree-sitter--do-parse)

0 commit comments

Comments
 (0)