When we introduced Tree-sitter, we removed the feature of syntax-highlighting JSDoc comments in JavaScript. This PR adds back JSDoc highlighting using a new Tree-sitter parser: tree-sitter-jsdoc.
Possible Drawbacks
This adds many more injections in some JavaScript files, so it may affect performance. In the course of adding this, I already found and fixed two performance bottlenecks related to large numbers of language injections:
Fixes #600
Rationale
When we introduced Tree-sitter, we removed the feature of syntax-highlighting JSDoc comments in JavaScript. This PR adds back JSDoc highlighting using a new Tree-sitter parser: tree-sitter-jsdoc.
Possible Drawbacks
This adds many more injections in some JavaScript files, so it may affect performance. In the course of adding this, I already found and fixed two performance bottlenecks related to large numbers of language injections:
/cc @Ben3eeE