Home > Software design >  Can't find problem in my settings.json for VS Code [unable to write into user settings]
Can't find problem in my settings.json for VS Code [unable to write into user settings]

Time:07-02

I started using MS VS Code and wanted to apply some basic settings. They all do work, however I can't add an extension right now, receiving the error message "unable to write into user settings".

Seems like I have something wrong in my settings.json but I don't know what? Here is my code:

    {
        
        "workbench.colorTheme": "One Dark Pro",
        "editor.quickSuggestions": {
    
             "other": "on",
             "comments": "off",
             "strings": "off" },
         
        "[markdown]": {
            "editor.quickSuggestions": true,
        },
        "atomKeymap.promptV3Features": true,
    
    
    "editor.tokenColorCustomizations": {
           "textMateRules": [
            {
                "scope": "heading.1.markdown entity.name.section.markdown, heading.1.markdown punctuation.definition.heading.markdown",
                 "settings": {
                     "foreground": "#0981D1",
                 }
             },  
            {
                  "scope": "heading.2.markdown entity.name.section.markdown, heading.2.markdown punctuation.definition.heading.markdown",
                   "settings": {
                       "foreground": "#9cecfb",
                   }
               },
               {
                   "scope": "heading.3.markdown entity.name.section.markdown, heading.3.markdown punctuation.definition.heading.markdown",
                   "settings": {
                       "foreground": "#83a4d4",
                   }
                }
                {
                "scope": "markup.italic",
                "settings": {
                    "foreground": "#ff7b00e0",
                    "fontStyle": "bold",
                }
                }   
                {
                "scope": "markup.bold",
                "settings": {
                    "foreground": "#26ca5c",
                    "fontStyle": "bold",
                }
                }
             ]
         }
     
        }

CodePudding user response:

This error means your JSON in your settings file is malformed. You have some errors inside of editor.tokenColorCustomizations. It should be:

"editor.tokenColorCustomizations": {
        "textMateRules": [
            {
                "scope": "heading.1.markdown entity.name.section.markdown, heading.1.markdown punctuation.definition.heading.markdown",
                "settings": {
                    "foreground": "#0981D1"
                }
            },
            {
                "scope": "heading.2.markdown entity.name.section.markdown, heading.2.markdown punctuation.definition.heading.markdown",
                "settings": {
                    "foreground": "#9cecfb"
                }
            },
            {
                "scope": "heading.3.markdown entity.name.section.markdown, heading.3.markdown punctuation.definition.heading.markdown",
                "settings": {
                    "foreground": "#83a4d4"
                }
            },
            {
                "scope": "markup.italic",
                "settings": {
                    "foreground": "#ff7b00e0",
                    "fontStyle": "bold"
                }
            },
            {
                "scope": "markup.bold",
                "settings": {
                    "foreground": "#26ca5c",
                    "fontStyle": "bold"
                }
            }
        ]
    }
  • Related