No Default Extension for JSON language

  • Hi,
    there is no default extension for JSON files in Style Configurator for the theme. Therefore JSON files are not highlighted when I open them.
    I added JSON section to theme file (Solarized-light.xml)

       <LexerType name="json" desc="JSON" ext="">
            <WordsStyle name="DEFAULT" styleID="11" fgColor="DCDCCC" bgColor="3F3F3F" fontName="" fontStyle="0" fontSize="" />
            <WordsStyle name="NUMBER" styleID="4" fgColor="8CD0D3" bgColor="3F3F3F" fontName="" fontStyle="0" fontSize="" />
            <WordsStyle name="STRING DOUBLE QUOTE" styleID="6" fgColor="CC9393" bgColor="3F3F3F" fontName="" fontStyle="0" fontSize="" />
            <WordsStyle name="STRING SINGLE QUOTE" styleID="7" fgColor="CC9393" bgColor="3F3F3F" fontName="" fontStyle="0" fontSize="" />
            <WordsStyle name="BOOLEAN NULL" styleID="5" fgColor="CEDF99" bgColor="3F3F3F" fontName="" fontStyle="3" fontSize="" keywordClass="instre1"/>
            <WordsStyle name="OPERATOR" styleID="10" fgColor="DFC47D" bgColor="3F3F3F" fontName="" fontStyle="1" fontSize="" />

    JSON record also exists in langs.model

    <Language name="json" ext="json" commentLine="" commentStart="" commentEnd="">
        <Keywords name="instre1">false null true</Keywords>

    But the def.ext. still is not there…


  • @Pavlo-Shevchenko

    could it be that you have an outdated npp version?
    I just copied over the json part from stylers.xml to my dark.xml and it is working.


  • No, I have the actual version. Any other suggestions?

  • @Pavlo-Shevchenko

    Could it be that you edited the wrong file? If you are using %APPDATA% configuration
    you need to edit the file there, otherwise the one in the installation directory.
    If you did this, I would give it a try to rename %APPDATA%\notepad++ directory and redo
    your steps.


  • @Claudia-Frank, thanks. The trick with AppData directory renaming worked. It seems that different configuration files conflicted.