dakrone / es-mode

An Emacs major mode for interacting with Elasticsearch
GNU General Public License v3.0
196 stars 34 forks source link

Auto-format response JSON after es-execute-request-dwim #67

Closed wych42 closed 6 years ago

wych42 commented 6 years ago

The result of C-c C-c is a one-line json which is not easy to read.

Is there a way to auto-format response json? I tried with json-mode, but the response buffer is read_only. I noticed there's a es-response-success-functions hook, but I'am new to lisp and didn't find a clue to use it format response. Any help would be appreciate.

dakrone commented 6 years ago

You can set es-always-pretty-print to t and the output will automatically be formatted.