What happened?
I’ve been editing JSON files, and have found that when I save the file, it is automatically formatted (which is great!). However the issue is that the formatting adds a comma to the final entry, which is invalid. I.e. trying to load the JSON file in a program crashes.
E.g. it would turn:
{
"key1": "val1",
"key2": "val2"
}
into
{
"key1": "val1",
"key2": "val2",
}
when the file is saved.
What did you expect to happen?
Most of the formatting done by the system is correct, but this step is wrong, there should not be a trailing comma.
Steps to reproduce
- Open a JSON buffer
- Save it, observe changes
System information
My doom info is below, as well as the modes I have activated in JSON mode. I don’t think I’ve done any specific configuration of JSON mode, but I am wondering if anyone has this issue in stock Doom, or its an unintended side effect of some other configuration I have.
Loading data dump...
Loading data dump...