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

Improve layout and user customizability #2

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

yochem
Copy link

@yochem yochem commented Jun 5, 2024

Hi!

Love the idea of this plugin. I wanted to add some more options for user customizability and use more of the updated neovim api instead of relying on old vim functions.

I changed a lot, so the result is pretty much a rewrite of the whole lua plugin 😅. I hope you don't mind.

Here is a list of new features:

  • jq respects users indentation settings for json
  • Improved error message for when jq is not installed or on $PATH
  • Uses scratch buffers for query and output buffer, no problem :q'ing any more!
  • Right ft's for buffers: jq for the query buffer and json for the output buffer
  • User commands have descriptions added
  • Full control over the window layout for the user!
  • Lua way of configuration, with a require('jq').setup() function (as package managers like lazy.nvim expect)
  • :Jqhorizontal is still available for backwards compatibility
  • :Jq uses the same layout as NeoVim's :InspectTree with query editor. This should feel familiar to users
  • Updated README, explaining new config options and containing a note with the configuration needed to get the original, 3 vertical panes, setup.

I hope you like it! If you have questions, suggestions or anything else, let me know! I can also write a help page about the plugin and document the code if you want.

@yochem
Copy link
Author

yochem commented Jun 5, 2024

This update would require 0.10 (which is the latest stable release). If you want to support older versions, I can look into the possibilities to do that.

@jrop
Copy link
Owner

jrop commented Jun 5, 2024

Hi @yochem, thanks for the contribution! As of late, I don't even have this plugin installed in my own config anymore, as I had hit some performance bottlenecks in huge JSON files, so I moved to just running:

:%!jq '...'

When I want to do processing. Based on time-constraints, I'm haven't decided if I want to devote the time to maintain this plugin in the future, so let me give it some thought. Feel free to ping me if I forget 😄 (I'm on GitHub fairly often).

@yochem
Copy link
Author

yochem commented Jun 5, 2024

Sure! If you want, I can also help maintain, or maintain a fork of this repo.

@yochem
Copy link
Author

yochem commented Aug 20, 2024

Hey @jrop, just checking in – have you decided yet? Otherwise, I think I'm gonna maintain my own version of this project, see yochem/jq-playground.nvim. It's currently a fork, but I don't think forks can have an issue tab. Would it be okay with you if I create a standalone repo for it? Of course, I can credit you in the readme or somewhere else (and your commits wills stay). Let me know what you think.

-- Yochem

@jrop
Copy link
Owner

jrop commented Sep 1, 2024

Hi @yochem , how about the following solution: you go ahead and maintain your fork, and I will probably archive this repo in the near future (after updating the README pointing others to your fork)? What do you think of that?

@jrop jrop mentioned this pull request Sep 1, 2024
@yochem
Copy link
Author

yochem commented Sep 1, 2024

Sounds good! Just have to check how I can enable issues on my fork :)

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