![](/web/img/vsmoddb-logo-s.png)
Mods / Prettier Vintage Story
Category:
#Utility
Author: Rhoun
Side: Both
Created: May 22nd at 4:58 PM
Last modified: May 22nd at 5:00 PM
Downloads: 68
Follow Unfollow 4
Author: Rhoun
Side: Both
Created: May 22nd at 4:58 PM
Last modified: May 22nd at 5:00 PM
Downloads: 68
Follow Unfollow 4
Latest version:
prettier-vs.zip
This version of prettier produces a more compact JSON that is still readable by using one-line objects when it is no longer than 'printWidth' in config (80 by default).
Please check the GitHub readme for instructions on how to use this with different IDEs/editors, and how to change maximum width.
Let me know if you have any ideas or if something doesn't work.
Enjoy!
Version | For Game version | Downloads | Release date | Changelog | Download | 1-click mod install* |
---|---|---|---|---|---|---|
v1 | 68 | May 22nd at 5:00 PM | Show | prettier-vs.zip |
If you encounter this more than with that one comment, please let me know, and I'll try to look into this once more. RogueRaiden
really just that the only comment even causing issue was the "//chase" comment, i dont have any idea why lol
of course simply removing the comment will resolve it not formatting. heck it might even go away on its own at some point
Interesting, but it doesn't happen for me at all, and I even tried to install vscodium and check there - it formats the document without any problem, even if I move comments around.
I wonder what I could be missing here, did you notice anything else that can be of use? I wonder if there was some special symbol or something similar that managed to get in the way.
RogueRaiden
https://pastebin.com/wG3rcR5Y
so somehow only the second comment //chase causes the error. the first, third and fourth comments in the file dont cause the error
I probably didn't check how it handles comments at all. Can you please provide a sample file where it fails? RogueRaiden
so im getting this error sometimes with //comments added in my json files and it wont format any part of the file (the comment in this particular error was //chase )
its interesting that it doesnt error with some other comments i have in other json files
Great, I'm happy it works for you now!
Yeah, the absolute path works the best, so you can have this version of prettier somewhere global and freely reuse it across different mod projects.
Please let me know if you encounter any issues or have any ideas for further tailoring this thing to VS modding.
RogueRaiden
Rhoun
Ahh i had no idea what i was supposed to do so thats what i tried first and it looked like it would be its own plugin (it shows up in extentions like it is when i put it into the extentions folder with a description and all, just with that error i said)
ohhhh i see, this is like another "node_modules" entry within the prettier extention
I believe i have it set correctly now, but it doesnt look like it does anything different than normal prettier? should i increase the printWidth from 80 to 120?
Edit: oh wait, now ive got it set correctly. a relative path like the Prettier extention used as an example didnt change it. but an absolute path did it correctly.
This is amazing!! thank you for this extension extension!
The provided file is not an extension itself, so you need to install the prettier extension, then there's this setting in the extension config "Prettier: Prettier Path".
Set it to point for the prettier-vs folder, e.g. F:/prettier-vs. You can also change the print width in the same settings window, and it'll work from there, so there is no need for an additional config file just for width.
RogueRaiden
trying to use with VSCodium (fork of VSCode) it doesnt load and gives this error:
"property engine.vscode is mandatory and must be of type string"
gg