I’m not sure what you mean by this; your image seems to show syntax highlighting just fine as far as I can tell. The only thing that doesn’t seem to be syntax highlighted is the call to greet()
at the end, but this might be due to the color scheme you’re using?
In my install of ST2 using whatever the default color scheme is, your code looks like this:
This is the TypeScript plugin asking you to pass build parameters to the compiler when it compiles your code.
There are two possible reasons why this is happening:
-
You’re not using a tsconfig.json
file to set up your project, so every time you run the build command the plugin is basically just running tsc
for you to compile you code. In this case it asks you for the arguments to pass to the compiler every time you build, but it remembers what you typed last time. You can just hit enter to accept the default (either blank or whatever you last used) to run the build again.
-
You do have a tsconfig.json
file, but the TypeScript file that you’re currently editing isn’t referenced anywhere in it. The TypeScript plugin will detect the tsconfig.json
files in your project and use that to run the build. If you’re editing a file that you haven’t told it about yet, it assumes the file isn’t part of the project and treats it as a one off file (like situation #1 above) because in that case it can’t build with the tsconfig.json
file.