about summary refs log tree commit diff
path: root/tools/emacs-pkgs/treecrumbs/treecrumbs.el
diff options
context:
space:
mode:
Diffstat (limited to 'tools/emacs-pkgs/treecrumbs/treecrumbs.el')
-rw-r--r--tools/emacs-pkgs/treecrumbs/treecrumbs.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/emacs-pkgs/treecrumbs/treecrumbs.el b/tools/emacs-pkgs/treecrumbs/treecrumbs.el
index a01e5490fa7f..54e2160385a0 100644
--- a/tools/emacs-pkgs/treecrumbs/treecrumbs.el
+++ b/tools/emacs-pkgs/treecrumbs/treecrumbs.el
@@ -90,6 +90,11 @@ The defined languages are stored in `treecrumbs-languages'."
   ("flow_pair" . ((_) key: (_) @key))
   ("flow_sequence" . "[]"))
 
+(define-treecrumbs-language json
+  ;; In JSON documents, crumbs are generated from key names and array fields.
+  ("pair" . ((pair key: (string (string_content) @key))))
+  ("array" . "[]"))
+
 (define-treecrumbs-language cpp
   ;; In C++ files, crumbs are generated from namespaces and
   ;; identifier declarations.