Activating/deactivating package for certain grammars


#1

Is there a mechanism to specify that a package should be enabled for certain grammars only? I know the

  "activationHooks": [
    "language-something:grammar-used"
  ]

trick in package.json, but what I’m interested in is enabling someone else’s package for certain grammars only. Better yet, I’d like to disable a package for certain grammars.

Thanks.


#2

Take a look at the code for my package package-manager. It can enable/disable packages and start/stop them. While there is a lot of code, the code that actually triggers the change is only a line or two.