Skip to content

Commit

Permalink
feat(data): add jq-mode with yq integration for YAML
Browse files Browse the repository at this point in the history
  • Loading branch information
abougouffa committed May 15, 2024
1 parent 67bbfde commit f678163
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions modules/me-data.el
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,20 @@
"-" #'json-decrement-number-at-point
"f" #'json-mode-beautify))

(use-package jq-mode
:straight t
:custom
(jq-interactive-font-lock-mode (if (+emacs-features-p 'tree-sitter) #'json-ts-mode #'json-mode))
:init
(defun +yq-interactively ()
"Use `jq-interactively' with \"yq\" for YAML."
(interactive)
(let ((jq-interactive-command "yq")
(jq-interactive-default-prompt "yq: ")
(jq-interactive-font-lock-mode (if (+emacs-features-p 'tree-sitter) #'yaml-ts-mode #'yaml-mode))
(jq-interactive-default-options "")) ;; "--yaml-roundtrip"
(call-interactively #'jq-interactively))))

(use-package graphviz-dot-mode
:straight (:files ("graphviz-dot-mode.el" "texinfo"))
:custom
Expand Down

0 comments on commit f678163

Please sign in to comment.