]> git.eshelyaron.com Git - emacs.git/commitdiff
Add sentence node regexp to json-ts-mode
authorTheodor Thornhill <theo@thornhill.no>
Mon, 16 Jan 2023 13:48:56 +0000 (14:48 +0100)
committerTheodor 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

index fbcda22acca391523afddb85eb99039b9be8ee41..f6a303290a88089e67b90dcb81d207d5043c35d6 100644 (file)
@@ -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