From 2c158c8b818901f11d92b28aeedd7e54e3bbad01 Mon Sep 17 00:00:00 2001 From: Edmund Miller Date: Thu, 28 May 2020 10:10:44 -0500 Subject: [PATCH] Feat: add counsel-jq Co-authored-by: rushsteve1 --- modules/lang/json/config.el | 11 ++++++++++- modules/lang/json/doctor.el | 4 ++++ modules/lang/json/packages.el | 1 + 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 modules/lang/json/doctor.el diff --git a/modules/lang/json/config.el b/modules/lang/json/config.el index 62db538af..9c847c684 100644 --- a/modules/lang/json/config.el +++ b/modules/lang/json/config.el @@ -11,4 +11,13 @@ (map! :after json-mode :map json-mode-map :localleader - "s" #'jsons-print-path)) + "p" #'jsons-print-path)) + + +(use-package! counsel-jq + :defer t + :init + (map! :after json-mode + :map json-mode-map + :localleader + "s" #'counsel-jq)) diff --git a/modules/lang/json/doctor.el b/modules/lang/json/doctor.el new file mode 100644 index 000000000..5578829e2 --- /dev/null +++ b/modules/lang/json/doctor.el @@ -0,0 +1,4 @@ +;;; lang/json/doctor.el -*- lexical-binding: t; -*- + +(unless (executable-find "jq") + (warn! "Couldn't find jq. counsel-jq won't work.")) diff --git a/modules/lang/json/packages.el b/modules/lang/json/packages.el index 69d84fb8a..95f58186d 100644 --- a/modules/lang/json/packages.el +++ b/modules/lang/json/packages.el @@ -3,3 +3,4 @@ (package! json-mode :pin "0e819e519a") (package! json-snatcher :pin "c4cecc0a50") +(package! counsel-jq :pin "b14dfc5c18")