Hi Maxime, thanks for this tag generator. I found this gist through your blog. I've been using your script for the past 6 months, maybe. I would like to expand the list of tags and include inline chunks that are located in the main text as:
Our data have `r nrow(df)` observations...
I think the variable for finding inline chunks could be (but I may be wrong):
re_inlinechunk = re.compile(r"^`r ([^,]+)(,[^}]*)?`$")
But I have no idea how to allocate it in your code. Any idea? Thanks again!
I'm not using nvim anymore (hence not relying on this script anymore), so I won't be able to test it through and through.
You should remove the beginning of line and end of line anchors in your regexp, also there is no need to check for chunk options, so this should suffice:
As for implementing the tag, you should insert this block (or something close to that, I haven't tested it) probably just before the logic for matching headers (# Headers).
This should add the inline chunks as regular chunks in tagbar.