 
 
 ;;; rest client
-;; optional deps
-(use-package json-mode
-  :ensure t)
-(use-package jq-mode
-  :ensure t
-  :config
-  (with-eval-after-load "json-mode"
-    (define-key json-mode-map (kbd "C-c C-j") #'jq-interactively)))
 ;; restclient package
 (use-package restclient
   :ensure t
   :mode (("\\.http\\'" . restclient-mode)
          ("\\.rest\\'" . restclient-mode))
   :bind (:map restclient-mode-map
-	          ("C-c C-f" . json-mode-beautify)))
+              ("C-c C-f" . json-mode-beautify)))
 ;; autocomplete in restclient
 (use-package company-restclient
   :ensure t
   :config
   (add-to-list 'company-backends 'company-restclient))
 
+;;; better json experience
+(use-package json-mode
+  :ensure t)
+;; counsel-jq for real time jq json filter
+(use-package counsel-jq
+  :ensure t
+  :config
+  (with-eval-after-load "json-mode"
+    (define-key json-mode-map (kbd "C-c C-j") #'counsel-jq)))
 
 ;;; auto tail log files
 (add-to-list 'auto-mode-alist '("\\.log\\'" . auto-revert-mode))

(define-key evil-insert-state-map (kbd "C-g") 'counsel-imenu)
(define-key evil-normal-state-map (kbd "C-p") 'counsel-projectile-find-file)
(define-key evil-insert-state-map (kbd "C-p") 'counsel-projectile-find-file)
;; always escape to normal mode including emacs mode
(define-key evil-emacs-state-map [escape] 'evil-normal-state)
;; always start in evil state https://github.com/noctuid/evil-guide#make-evil-normal-state-the-initial-state-always

    (eshell 'N)))
(defun ab/new-eshell-in-split ()
  "create a new eshell in new split.
if in eshell already; create a vertical split,
otherwise create a horizontal split"
  (interactive)
  (if (derived-mode-p 'eshell-mode)
