From 77659bd46345b86159d8a5d4b6f4993ec20c30a6 Mon Sep 17 00:00:00 2001 From: Theodor Thornhill Date: Mon, 16 Jan 2023 14:48:56 +0100 Subject: [PATCH] Add sentence node regexp to json-ts-mode * lisp/progmodes/json-ts-mode.el (json-ts-mode): Add pair for sentence movement. --- lisp/progmodes/json-ts-mode.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/progmodes/json-ts-mode.el b/lisp/progmodes/json-ts-mode.el index fbcda22acca..f6a303290a8 100644 --- 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 -- 2.39.5