feature request:
Did you check existing requests?
- [X] I have searched the existing issues
Describe the feature
Add jqfmt.
Provide background
Some times keeping our jq queries in their own file makes sense. There is an lsp for the jq language already and a formatter. It'll be great to have the formatter supported by conform.
What is the significance of this feature?
nice to have
Additional details
No response
formatters = {
jqfmt = {
command = os.getenv("XDG_DATA_HOME") .. "/go/bin/jqfmt",
args = { "-ob", "-ar", "-op", "pipe" },
},
}
This config will fail with:
21:14:51[ERROR] Formatter 'jqfmt' error: time="2024-07-06T21:14:51+03:00" level=fatal msg="could not read file: open /dev/stdin: no such device or address"
Leaving this here for reference.
PR opened upstream: https://github.com/noperator/jqfmt/pull/3
Merged upstream PR ✅
Beautiful
@LeonardoMor I don't think we need this issue anymore, should we close it? conform doesn't need to support jq/jqfmt directly, it could just be a custom formatter.
True. But the same can be said about the other formatters
I guess so, @stevearc should make the call then.
Alternatively, we could send a PR. Are there any guidelines to do so? Or to add a formatter to conform so that it is available to config out of the box?
Nevermind. Might not be ready for general use. See here
That is indeed one of the things I ran into as well.