Closed Aerijo closed 5 years ago
An even better way of checking the scopes are right is looking at the server's declared scopes
const jsScopes = ['source.js', 'source.js.jsx', 'javascript']
const tsScopes = ['source.ts', 'source.tsx', 'typescript']
so they match (and shows it needs a PR to remove the early Tree-sitter scopes)
103 was meant to stop this package loading unnecessarily, but it only supported the core JS / TS grammar packages.
This changes the event hooks to be root scope based, which should cover all standard JS(X) and TS(X) grammar root scope names (I compared against the core packages +
language-babel
, and it matches theextended scopes
section too). As Tree-sitter has settled down, there should be no risk of different scope conventions.Alternative designs
We could simply revert #103. I've seen varying reported values from
time-cop
, and it often seems to depend on the order packages happen to load in. Having said that, all my installedide-
packages consistently get reported among the biggest time sinks.closes #151