kaarmu / typst.vim

Vim plugin for Typst
MIT License
281 stars 24 forks source link

New `typstMarkupItalic` seems have trouble with cite #66

Closed yangwenbo99 closed 10 months ago

yangwenbo99 commented 10 months ago

It seems that when a citation contains underscores _, and there is some italic text in the same paragraph, the highlight of the whole paragraph simply disappear. Going back to the old way of highlighting italic seems to fix the issue, but I am not sure whether this will create more issues. image

Also, the regex for typstMarkupItalic seems to have some problem interacting with my math highlight code. Commenting it out seems to mitigate #64.

kaarmu commented 10 months ago

Well, the current region is not sufficient (example below) and I haven't found a good way except match+region, like it is now, that captures all italic scenarios and provides concealment.

This is how it looks if we just comment out the match: image