Community
    • Login

    No Default Extension for JSON language

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    highlightextensionlanguagedefaultjson
    5 Posts 2 Posters 7.2k Views 2 Watching
    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.
    • SuncatcherS Offline
      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 FrankC 1 Reply Last reply Reply Quote 0
      • Claudia FrankC Offline
        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
        • SuncatcherS Offline
          Suncatcher
          last edited by

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

          Claudia FrankC 1 Reply Last reply Reply Quote 0
          • Claudia FrankC Offline
            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

            SuncatcherS 1 Reply Last reply Reply Quote 0
            • SuncatcherS Offline
              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

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              • First post
                Last post
              The Community of users of the Notepad++ text editor.
              Powered by NodeBB | Contributors