Closed yochem closed 1 year ago
Hi, so all text nodes are delimited by punctuation symbols (so we can detect things like (TODO: ...).TODO:..
To highlight the whole URL, you may try to match each individual part, like
("text" @_a @text.note . "text" @_b @text.note . "text" @_c @text.note (#match? @_a "^https?$") (#match? @_b "^:$") (#match? @_c "^/$"))
But adding support for URLs is something I wanted to add https://github.com/stsewd/tree-sitter-comment#todo, but wasn't sure if it would be okay to include.
Thanks! Will try it out. I think it would be very nice to include url's. I was also thinking about including something like a code node for text in backticks, but that might be too markdown-like.
Hi,
I don't know if this is the right place to ask, but I figured you might know the solution. I would like to highlight URI's in comments, so far, I've tried the following:
I verified the lua pattern:
But still nothing:
What's weird, is that if I try to do for example only 'http', like so:
It works:
Could it be because
:
is a node or something in the comment grammar?