kaarmu / typst.vim

Vim plugin for Typst
MIT License
294 stars 27 forks source link

Running over bracket pairs inside raw text blocks more than once breaks highlighting on Neovim #22

Closed brkydnc closed 1 year ago

brkydnc commented 1 year ago

{}

Lorem ipsum dolor sit amet

()


Lorem ipsum dolor sit amet

[]

Lorem ipsum dolor sit amet

I'm on Manjaro Linux, with Neovim v0.9,0 release build, and using the default colorscheme.

In the snippet above, If I run my cursor through the first of the bracket pairs {}, and then run over any of () or [], the syntax highlighting breaks below the second bracket pair. This was just an example, not the general case.

First step, image

Second step, image

Using :nohlsearch solves the problem, but not for good.

Here is a list of my observations on this behavior:

kaarmu commented 1 year ago

Does the break and stay broken? For me, I notice the break but it immediately redraws it (on neovim).

brkydnc commented 1 year ago

I tried writing a complete description of the behavior, after your comment, but it acts in a whole lot of different ways that I can't list them. The broken highlighting sometimes fixes itself when I move in the document upwards or downwards direction, but most of the time it is still broken.

kaarmu commented 1 year ago

Okay, I will try to look at it during the week.

kaarmu commented 1 year ago

Maybe solved by cb49c85. Could you check on your end?

brkydnc commented 1 year ago

It seems fine, thanks.