TypeScript not highlighting syntax outside of default style
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 last edited by Alan Kilborn
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.
PeterJones last edited by
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
@PeterJones Thank you, I will try this.
@Alan-Kilborn Thank you for the correction. I’m sad Vibrant Ink is not maintained, as it is my favorite theme.
PeterJones last edited by PeterJones
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.
@PeterJones now I have a new task: recreate Vibrant Ink to be more faithful and up-to-date.
Alan Kilborn last edited by
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.