-
Notifications
You must be signed in to change notification settings - Fork 202
First TS keyword in file misses last character of bold highlighting #139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@johnnyreilly what theme's (ui + syntax) + atomts version are you using. I don't seem to be getting this : Note: In your example |
I hadn't spotted the The files in the shot are these: https://github.com/johnnyreilly/proverb-offline/blob/master/Proverb.Web/app/sayings/sayings.ts My UI and syntax themes are Atom Light. I'm using |
I suspect this is a file encoding issue. Two bytes off feels like a BOM marker not getting detected. |
Some odd behaviour to report. I just fired up atom again and Both files are UTF-8 according to atom. |
Having a BOM in the file does throw it off. : https://github.com/TypeStrong/atom-typescript-examples/tree/master/bomtest furthermore its how the typescript classifier classifies it. It completely ignores the BOM. |
A combination of how Atom + TypeScript classifies BOM. TypeScript ignores it (a bad thing ... I would have liked it to classify it as whitespace). Atom doesn't want other's to classify it (this makes the bad thing by TypeScript a good thing), except that atom will still give you the string with the BOM and expect you (the grammar author) to not return it as a part of your classification. So finally we still need to offset our classification by the BOM amount. You can see the commit for details ❤️ |
published as |
Cool - so the fix was in atom-typescript rather than elsewhere. |
yes 💓 |
Nice - that's pretty clear. I remembered seeing discussions around TypeScript and encoding elsewhere but had completely forgotten the details. I'm just upgrading to 0.78.0 now - will report back.... |
Sleep well chap! Good work 👏 |
I've just given it a test with 0.78 and there's good and bad news. The good news is the highlighting now looks different: But unfortunately The slightly worse news is that the TypeScript build doesn't seem to work at all now. Both saving and ctrl+shift+b result in this:
|
Quick note : the shortcut only works if your focus cursor is in an editor If that fixes it for you we can make the shortcut more global later. |
The build shortcut + goto definition shortcut are a bit more global so they should just work. Try |
Regarding it not appearing as bold : it seems to be tokenize correctly as you can see : I am assigning
|
Hey @basarat,
Yup the theme lends it almost no visibility - maybe I'll switch! But it seems to share the same presentation as I'm still getting no compilation but I'll try and clean install of Atom and atom-typescript and see if that resolves it. (Imagine trying that with Visual Studio - would take days!) If the compilation issue still presents I'll open new issue. |
Completely clean install and I can't compile at all. However I think it's related to some problem with my system - when I roll back to [email protected] I still get no compilation (even though I'm not about to rebuild this machine so I'm going to look at this as an opportunity to try out atom on Linux... |
And after all that it was a return of |
Sorry about that. I've made this my main task : #138 will have it sorted today after work. Hopefully before you get to read this in your timezone ❤️ |
See screenshot illustrating below - look out for module and interface
This only seems to be an issue if the first word in a file is TS keyword. You can see here it's not a problem:
The text was updated successfully, but these errors were encountered: