Community

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

    TypeScript not highlighting syntax outside of default style

    Help wanted · · · – – – · · ·
    syntax highligh typescript style
    3
    8
    201
    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.
    • Seth Bettwizilch
      Seth Bettwizilch last edited by

      Hello, I tried opening a TypeScript (.ts) file today for the first time, but it wasn’t highlighted at all. I thought it might have been an issue of language detection, but the language was properly selected as TypeScript and code folding still worked. Then I realized it might be my selected style (Vibrant Ink), and noticed that syntax highlighting only worked with the default style, even though the only styles I have are the ones that came with the notepad++ install.

      No style but Default works with TypeScript syntax highlighting. All other files I’ve opened previously have proper syntax highlighting with non-Default styles. Can anyone help?

      Alan Kilborn PeterJones 2 Replies Last reply Reply Quote 1
      • Alan Kilborn
        Alan Kilborn @Seth Bettwizilch last edited by Alan Kilborn

        @Seth-Bettwizilch

        First, when you mention Vibrant Ink you are talking about a theme, not a style. Styling within the larger theme is called lexing.

        It appears the only theme files that contain data on Typescript are the Default (stylers.xml), Zenburn, and DarkModeDefault. So that explains why in Vibrant Ink you see no lexing.

        Themes are notoriously poorly maintained, one reason I stick to Default. Probably the dark mode default is pretty good as well. Other than that…good luck.

        Seth Bettwizilch 1 Reply Last reply Reply Quote 3
        • PeterJones
          PeterJones @Seth Bettwizilch last edited by

          @Seth-Bettwizilch ,

          Themes often aren’t updated when the new languages were added to Notepad++. If you want to include a new language in the theme, you can copy the “TypeScript” portion from the default stylers.xml into the theme, reload Notepad++, then change the colors for TypeScript to match the rest of your theme

          Seth Bettwizilch 1 Reply Last reply Reply Quote 3
          • Seth Bettwizilch
            Seth Bettwizilch @PeterJones last edited by

            @PeterJones Thank you, I will try this.

            1 Reply Last reply Reply Quote 0
            • Seth Bettwizilch
              Seth Bettwizilch @Alan Kilborn last edited by

              @Alan-Kilborn Thank you for the correction. I’m sad Vibrant Ink is not maintained, as it is my favorite theme.

              PeterJones 1 Reply Last reply Reply Quote 0
              • PeterJones
                PeterJones @Seth Bettwizilch last edited by PeterJones

                @Seth-Bettwizilch ,

                The problem is that all but the Default (and now DarkModeDefault) Themes were created by users, and submitted to the project years ago. But the developers weren’t interested in maintaining the themes, and the original submitters never came back to re-submit those themes, so they just stagnated there.

                We have actually started a new user-supplied Themes Collection, where users can submit themes for others to download and install… but that will be outside the main application. If users want to submit updates to themes in the Collection, it will be a relatively-easy process (and won’t have to go through the hurdles of getting something changed in the main program). The idea is that a lower barrier-to-change will increase the chances that themes will be updated when new languages are defined.

                Seth Bettwizilch 1 Reply Last reply Reply Quote 4
                • Seth Bettwizilch
                  Seth Bettwizilch @PeterJones last edited by

                  @PeterJones now I have a new task: recreate Vibrant Ink to be more faithful and up-to-date.

                  Alan Kilborn 1 Reply Last reply Reply Quote 2
                  • Alan Kilborn
                    Alan Kilborn @Seth Bettwizilch last edited by

                    @Seth-Bettwizilch said in TypeScript not highlighting syntax outside of default style:

                    recreate Vibrant Ink to be more faithful and up-to-date

                    Maybe give it a new fancy name as well, and submit it to the user-defined themes collection, where it will be maintained in the future (by you) and really shine! :-)

                    My thinking is that the existing Vibrant Ink theme is just going to live on the way it currently is, under Notepad++, so something you improve/augment would benefit from a new name to avoid confusion.

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