Fix jsdoc: play nice with the comment parser (#1108)

Using separate queries makes it work as expected.
Also, for the comment parser to be able to override the other tokens
we need to remove the comment from highlights (this shouldn't be a
problem since that section is already highlighted as a comment).

And, the order of the captures matter,
having jsdoc first will have more priority over `@param`.

Fixes https://github.com/nvim-treesitter/nvim-treesitter/issues/1069
This commit is contained in:
Santos Gallegos 2021-03-27 10:51:16 -05:00 committed by GitHub
parent edcac596ce
commit 0df7c4aa39
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -1,4 +1,5 @@
((comment) @comment @jsdoc)
(comment) @jsdoc
(comment) @comment
((regex_pattern) @regex)

View file

@ -1,3 +1,2 @@
(_) @comment
(tag_name) @keyword
(type) @type