Closed buchmoyerm closed 10 months ago
I think you need to remove the filename too. The command is supposed to operate on stdin/stdout, with the path just there as a hint. It might half work operating directly on the saved file, but would have quirks like losing your unsaved edits and probably blowing up if you try to format a buffer that's not already a saved file.
Fixed properly in #232 to operate on stdin.
The jsonnetfmt help text does not mention a path argument and when running
:FormatCode
in a jsonnet file I get an error saying that -p is an unrecognized argument. But removing-path
in my local copy of the plugin allows vim to reform my jsonnet files.The history of the jsonnetfmt file has not changed in many years so I don't think this is a recent change either. https://github.com/google/jsonnet/commits/e605e4673294d2bf43eb8351fb8f5d9ba26d5e68/cmd/jsonnetfmt.cpp