Sublime Forum

Sublime Text preference error

#1

So I am new to the preference file in Sublime Text 3. I haven’t touched it. I wanted to make 1 small change but it would give me this:

here is the JSON source

{
	"added_words":
	[
		"github",
		"Roguelike",
		"Roguelike's"
	],
	"color_scheme": "Packages/Material Theme/schemes/Material-Theme-Palenight.tmTheme",
	"dictionary": "Packages/Language - English/en_US.dic",
	"font_size": 12,
	"ignored_packages":
	[
	],
	"theme": "Material-Theme-Palenight.sublime-theme"
}

Here’s the changed JSON file

{
	"added_words":
	[
		"github",
		"Roguelike",
		"Roguelike's"
	],
	"color_scheme": "Packages/Material Theme/schemes/Material-Theme-Palenight.tmTheme",
	"dictionary": "Packages/Language - English/en_US.dic",
	"font_size": 12,
	"ignored_packages":
	[
		// Set to true to turn spell checking on by default
    "spell_check": true,
	],
	"theme": "Material-Theme-Palenight.sublime-theme"
}
0 Likes

#2

You put the spell_check setting inside of the list of ignored_packages, which is not valid JSON. If you move that line to above "ignored_packages" or above "theme", your problem should go away.

2 Likes

#3

Thanks @OdatNurd

I really should have double checked to see where I put that json code :slight_smile:

0 Likes

#4

Just change "spell_check": true, to "spell_check": true
remove comma on the last

1 Like

#5

Sublime’s internal JSON parser is not sensitive to trailing commas, so that isn’t a problem. However, the contents of a list ([ ]) needs to be a comma separated list of items but "spell_check": true is a dictionary key, so trailing comma or not it will still not work.

1 Like