• Login
Community
  • Login

TypeScript not highlighting syntax outside of default style

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
syntax highlighttypescriptstyle
8 Posts 3 Posters 1.7k 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.
  • S
    Seth Bettwizilch
    last edited by Sep 9, 2022, 5:10 PM

    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?

    A P 2 Replies Last reply Sep 9, 2022, 5:21 PM Reply Quote 1
    • A
      Alan Kilborn @Seth Bettwizilch
      last edited by Alan Kilborn Sep 9, 2022, 5:24 PM Sep 9, 2022, 5:21 PM

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

      S 1 Reply Last reply Sep 9, 2022, 5:38 PM Reply Quote 3
      • P
        PeterJones @Seth Bettwizilch
        last edited by Sep 9, 2022, 5:21 PM

        @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

        S 1 Reply Last reply Sep 9, 2022, 5:24 PM Reply Quote 3
        • S
          Seth Bettwizilch @PeterJones
          last edited by Sep 9, 2022, 5:24 PM

          @PeterJones Thank you, I will try this.

          1 Reply Last reply Reply Quote 0
          • S
            Seth Bettwizilch @Alan Kilborn
            last edited by Sep 9, 2022, 5:38 PM

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

            P 1 Reply Last reply Sep 9, 2022, 5:50 PM Reply Quote 0
            • P
              PeterJones @Seth Bettwizilch
              last edited by PeterJones Sep 9, 2022, 5:51 PM Sep 9, 2022, 5:50 PM

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

              S 1 Reply Last reply Sep 9, 2022, 6:26 PM Reply Quote 4
              • S
                Seth Bettwizilch @PeterJones
                last edited by Sep 9, 2022, 6:26 PM

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

                A 1 Reply Last reply Sep 9, 2022, 6:53 PM Reply Quote 2
                • A
                  Alan Kilborn @Seth Bettwizilch
                  last edited by Sep 9, 2022, 6:53 PM

                  @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
                  2 out of 8
                  • First post
                    2/8
                    Last post
                  The Community of users of the Notepad++ text editor.
                  Powered by NodeBB | Contributors