Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    No Default Extension for JSON language

    Help wanted · · · – – – · · ·
    highlight extension language default json
    2
    5
    6256
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Suncatcher
      Suncatcher last edited by

      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="" />
          </LexerType>
      

      JSON record also exists in langs.model

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

      But the def.ext. still is not there…

      Imgur

      Claudia Frank 1 Reply Last reply Reply Quote 0
      • Claudia Frank
        Claudia Frank @Suncatcher last edited by

        @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.

        Cheers
        Claudia

        1 Reply Last reply Reply Quote 0
        • Suncatcher
          Suncatcher last edited by

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

          Claudia Frank 1 Reply Last reply Reply Quote 0
          • Claudia Frank
            Claudia Frank @Suncatcher last edited by

            @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.

            Cheers
            Claudia

            Suncatcher 1 Reply Last reply Reply Quote 0
            • Suncatcher
              Suncatcher @Claudia Frank last edited by

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

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Copyright © 2014 NodeBB Forums | Contributors