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
Does not want work until initialize config #1451
Comments
To save resources, atom-typescript is only really started on a strict on-demand basis. "Demand" is a TypeScript file being opened in this case (or, more precisely, when a TypeScript grammar is used). Or, as you figured out, running |
Of course I open ts-files. https://i.imgur.com/Y7pGv03.gifv |
Hmm. Okay. Do you have any community TypeScript grammars installed? We can't really support those, due to those often creating conflicts with bundled language-typescript. (to be clear, I'm on Atom 1.31.2 and I can't reproduce, atom-typescript works as expected. So I'm assuming the issue is the result of interaction with your particular environment, not necessarily a problem with the package itself) |
Yes, I use language-typescript-grammars-only instead built-in language-typescript to get inline html-code highlight. |
So, okay, a bit of background. Atom has two mechanisms for deferred package activation: activation on command and activation on a grammar package being used. Activating atom-typescript unconditionally on Atom start is obviously not so good for performance reasons. Both of those mechanisms are static, meaning those can't be configured after package installation. So we're currently activating on Also, until In theory, we could activate on other grammar packages being used. But deciding which ones is not necessarily straightforward, since supporting a grammar package is essentially endorsing it. And endorsing packages that are unmaintained, potentially broken, etc isn't something I think we should do. And there isn't one "definitive" community TypeScript grammar package that I am aware of. The "proper" way to get what you want is to pester upstream about adding the features you want. Anyway, the best I can offer atm is a bit of a hack. You could manually trigger the #change package name in the next line if needed
do (grammarPackageImUsing = "language-typescript-grammars-only") ->
atom.packages.onDidTriggerActivationHook "#{grammarPackageImUsing}:grammar-used", ->
atom.packages.triggerActivationHook 'language-typescript:grammar-used' (restart Atom for it to take an effect) I guess I could add this hack to the FAQ page. |
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 |
There is tsconfig.json in root folder of my project already. But typescript plugin does not want work until I implicitly call "Typescript: Initialize config". There is no changes in tsconfig.json after call that command.
atom 1.31.1
atom-typescript 12.6.3
The text was updated successfully, but these errors were encountered: