TypeStrong / atom-typescript

The only TypeScript package you will ever need
https://atom.io/packages/atom-typescript
MIT License
1.13k stars 205 forks source link

Type checking on unsaved files #1495

Closed martpie closed 4 years ago

martpie commented 5 years ago

There is one thing supported out of the box by VS Code that I really miss in Atom: the ability to cmd+N, then select the language of the document to TypeScript, and start hacking:

Screen Shot 2019-03-25 at 11 02 28 Screen Shot 2019-03-25 at 11 02 38

I have no idea if this is actually do-able with Atom's APIs, and I did not see any matching issue on this repo, but supporting this usecase would be awesome.

lierdakil commented 5 years ago

Hi. There are a couple challenges with the new files. For one, those don't have any meaningful file path. Atom-TypeScript actually checks if the editor has a well-defined file path (and it also checks file extension to avoid undue weirdness if TypeScript grammar was selected accidentally), since that file path is then used to relate the file to the correct project and whatnot. Consequently, I doubt unnamed files would work as well as we'd like even if I did disable this check.

One recommendation I can make though, try using Advanced Open File package for Atom. It allows you to not only create & save new files faster (well, -ish), but it also sets file path for newly-created files, which will work around this issue.

github-actions[bot] commented 4 years ago

This issue has been marked as stale because it did not have any activity for the last 90 days or more. Remove the stale label or comment or this will be closed in 14 days