Community
    • Login

    Recent update changes language colors

    Scheduled Pinned Locked Moved General Discussion
    6 Posts 4 Posters 2.0k Views
    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.
    • Emma MorrisE
      Emma Morris
      last edited by

      Hi! I use Notepad++ to edit JSON, and have been for years. I recently updated to 7.8.5, and it changed all the default colors for my JSON text. I’ve never touched these, and I don’t know why it would do this. I can confirm it’s this updating process, as installing an older version uses the normal colors and updating that uses the newer colors. Is there any way I can prevent this from happening?

      1 Reply Last reply Reply Quote 1
      • Emma MorrisE
        Emma Morris
        last edited by

        Did some more installing of older versions, seems the change happens from 7.8.2 to 7.8.3. I can’t find any differences in the Style Preferences that would affect this (I looked in General and JSON).

        1 Reply Last reply Reply Quote 1
        • EkopalypseE
          Ekopalypse
          last edited by

          Upgrade, remove langs.xml and start npp should do the trick.

          1 Reply Last reply Reply Quote 2
          • PeterJonesP
            PeterJones
            last edited by

            @Emma-Morris ,

            Yes, there appears to have been a change in the JSON styling between v7.8.2 and v7.8.3. Verifying with fresh unzip of portable(zip) editions:

            v7.8.2

            f3ac2d5e-136e-4565-bcf1-f77a4275d82f-image.png

            v7.8.3

            c9505c3e-f499-4015-8cb0-d803e6c6bb13-image.png

            deltas

            langs.xml changed in the JSON from v7.8.2 (left) to v7.8.3 (right):
            cd22326d-9b71-4c5b-a3a0-ac0f5af1b608-image.png

            stylers.xml also changed in the JSON from v7.8.2 (left) to v7.8.3 (right):
            c5820467-9228-4037-9ca0-047b482c39b4-image.png

            Looking at the release notes at https://notepad-plus-plus.org/downloads/v7.8.3/ , it specifically says “3. Improve Json syntax highlighting.”

            And personally, I agree, the changes were an improvement – it distinguishes between the name and the value, even if they are both strings, and has a lot more granularity of what can and cannot be styled.

            As @Ekopalypse said, however, if you previously had a normal install the langs.xml and/or stylers.xml for v7.8.2 or earlier version in your %AppData%\Notepad++ folder, and upgraded to v7.8.3 or newer, then the StyleID’s won’t match the lexer, so colors may be applied to the wrong tokens, and you won’t have the full customizability that is built into the lexer; follow his steps for stylers.xml and langs.xml to refresh those to the newest values.

            However, if you delete and auto-regenerate stylers.xml, any other languages’ customization will also be lost. Instead of deleting, you might want to rename stylers.xml to old.stylers.xml, then use the Compare plugin to compare the old.stylers.xml to the regenerated stylers.xml, and then copy over any customizations into the regenerated file.

            1 Reply Last reply Reply Quote 4
            • Alan KilbornA
              Alan Kilborn
              last edited by

              Peter says it all, but maybe also of relevance:

              • Language Style Colour are not respected since NP++ Version 7.8.3 (64bit)
              • Json is not highlighting any color
              1 Reply Last reply Reply Quote 2
              • Emma MorrisE
                Emma Morris
                last edited by

                Alright, thanks for your help everyone! Deleting the langs.xml file fixed it.

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post
                The Community of users of the Notepad++ text editor.
                Powered by NodeBB | Contributors