highlights.scm 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. ; Highlight this comment even if it's not “valid” JSDoc.
  2. ((ERROR) @comment.block.documentation.jsdoc.js
  3. (#is? test.root true))
  4. ((ERROR) @punctuation.definition.begin.comment.jsdoc.js
  5. (#is? test.root true)
  6. (#set! adjust.startAndEndAroundFirstMatchOf "^/\\*\\*"))
  7. ((ERROR) @punctuation.definition.end.comment.jsdoc.js
  8. (#is? test.root true)
  9. (#set! adjust.startAndEndAroundFirstMatchOf "(?:\\*)?\\*/$"))
  10. (document) @comment.block.documentation.jsdoc.js
  11. ((document) @punctuation.definition.begin.comment.jsdoc.js
  12. (#set! adjust.startAndEndAroundFirstMatchOf "^/\\*\\*"))
  13. ((document) @punctuation.definition.end.comment.jsdoc.js
  14. (#set! adjust.startAndEndAroundFirstMatchOf "(?:\\*)?\\*/$"))
  15. ((inline_tag) @meta.inline-tag.jsdoc.js)
  16. (tag_name) @keyword.other.tag.jsdoc.js
  17. ((tag (type)) @storage.type.instance.jsdoc.js
  18. ; Join the type with its surrounding braces.
  19. (#set! adjust.startAt firstChild.nextSibling.startPosition)
  20. (#set! adjust.endAt firstChild.nextSibling.nextSibling.nextSibling.endPosition))
  21. (identifier) @variable.other.jsdoc.js
  22. "{" @punctuation.definition.begin.bracket.curly.jsdoc.js
  23. "}" @punctuation.definition.end.bracket.curly.jsdoc.js