Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gptel: Use json-mode to inspect query if available #608

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pabl0
Copy link

@pabl0 pabl0 commented Feb 3, 2025

  • gptel.el (gptel--inspect-query): Use json-mode when inspecting the query (dry run), if json-mode is available.

* gptel.el (gptel--inspect-query): Use json-mode when inspecting the
query (dry run), if json-mode is available.
@karthink
Copy link
Owner

karthink commented Feb 4, 2025

@pabl0 Thanks for the PR. I use fundamental-mode intentionally because both json-mode and the built-in js-json-mode suck when long lines are involved, slowing Emacs down to a crawl. And because long chunks of the buffer end up as a single line in the encoded JSON, this is always the case. (so-long mode does little to help here.)

In contrast, lisp-data-mode, which is used by the lisp-style query inspector, is much better at handling long lines.

If you wish to use json-mode you can advise the function in your configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants