diff options
| author | Craig Jennings <c@cjennings.net> | 2026-07-14 00:24:34 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-07-14 00:24:34 -0500 |
| commit | 21484b5dc589c3be809d655136214452264cbcb2 (patch) | |
| tree | 55402bd4dca36b2b854afc90badffebfe8f560d4 /modules/prog-json.el | |
| parent | 93146f733ba59de5d592a8269dad9a7faddd904e (diff) | |
| download | dotemacs-21484b5dc589c3be809d655136214452264cbcb2.tar.gz dotemacs-21484b5dc589c3be809d655136214452264cbcb2.zip | |
fix(prog-json): make the jq query key actually reachable
C-c C-q was bound via :bind (:map json-ts-mode-map) inside the jq-mode use-package, which defers the binding to jq-mode's load. Nothing ever loaded jq-mode, so the key was dead. The binding now keys on json-ts-mode's load, and jq-interactively's autoload pulls jq-mode in on first press.
Diffstat (limited to 'modules/prog-json.el')
| -rw-r--r-- | modules/prog-json.el | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/modules/prog-json.el b/modules/prog-json.el index e7abd182..66f4c5f2 100644 --- a/modules/prog-json.el +++ b/modules/prog-json.el @@ -62,9 +62,14 @@ back to the built-in `json-pretty-print-buffer-ordered'." ;; interactive jq queries against JSON buffers (use-package jq-mode - :defer t - :bind (:map json-ts-mode-map - ("C-c C-q" . jq-interactively))) + :defer t) + +;; Bind on json-ts-mode's own map, keyed to its load. The old +;; :bind (:map json-ts-mode-map ...) inside the jq-mode use-package deferred +;; the binding to jq-mode's load -- which nothing triggered, so the key was +;; dead. jq-interactively is autoloaded, so pressing the key loads jq-mode. +(with-eval-after-load 'json-ts-mode + (keymap-set json-ts-mode-map "C-c C-q" #'jq-interactively)) (provide 'prog-json) ;;; prog-json.el ends here. |
