tree-sitter-jsdoc
tree-sitter-jsdoc copied to clipboard
[Feature]: Expose comment contents as a separate node
Posting from a couple downstream highlighting issues and didn't see anything here so I thought I'd open an issue.
The treesitter-nvim highlights for jsdoc seem to be struggling and/or limited due to the lack of a node around the comment contents, and I was wondering if there was any interest in implementing that?
For example:
/** @param {string} bufferContent */
// ^ Can't distinguish the trailing `/` of the comment vs a delimiter _in_ the comment, so it gets picked up as the latter
/**
* @param {string} bufferContent
* ^ Picked up as a variable parameter
*/
/** @param {string} bufferContent */
// ^ Cannot be distinguished as a variable parameter due to being a singular line
Purely from what I've been told (I'm still learning how these things all piece together) this is a problem for this repo if it were going to be addressed. Please let me know if that's wrong, happy to take this elsewhere. Thanks