projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c8dd37b
)
Add sentence node regexp to json-ts-mode
author
Theodor Thornhill
<theo@thornhill.no>
Mon, 16 Jan 2023 13:48:56 +0000
(14:48 +0100)
committer
Theodor Thornhill
<theo@thornhill.no>
Mon, 16 Jan 2023 13:55:12 +0000
(14:55 +0100)
* lisp/progmodes/json-ts-mode.el (json-ts-mode): Add pair for sentence
movement.
lisp/progmodes/json-ts-mode.el
patch
|
blob
|
history
diff --git
a/lisp/progmodes/json-ts-mode.el
b/lisp/progmodes/json-ts-mode.el
index fbcda22acca391523afddb85eb99039b9be8ee41..f6a303290a88089e67b90dcb81d207d5043c35d6 100644
(file)
--- a/
lisp/progmodes/json-ts-mode.el
+++ b/
lisp/progmodes/json-ts-mode.el
@@
-147,6
+147,8
@@
Return nil if there is no name or if NODE is not a defun node."
(rx (or "pair" "object")))
(setq-local treesit-defun-name-function #'json-ts-mode--defun-name)
+ (setq-local treesit-sentence-type-regexp "pair")
+
;; Font-lock.
(setq-local treesit-font-lock-settings json-ts-mode--font-lock-settings)
(setq-local treesit-font-lock-feature-list