kaarmu / typst.vim

Vim plugin for Typst
MIT License
291 stars 25 forks source link

Messed up syntax highlighting on inline code inside term list #85

Closed AurelWeinhold closed 7 months ago

AurelWeinhold commented 8 months ago

Hi, I've encountered a bug in the syntax highlighting.

/ ```c #pragma omp parallel for reduction(+:s)```:  

This line messes up the syntax highlighting as that assumes the : between the + and the s is whats closing the term list, while it is actually part of the inline code. This way after that a new code-block is opened highlighting everything that follows this as such.

Thank you for developing this plugin, its been great so far.

Greetings

kaarmu commented 8 months ago

Hi! Nice find :) I will look into it upcoming days.

Probably typstMarkupTermList needs to become a syntax region so it doesn't end on the : in reduction(+:s).

kaarmu commented 7 months ago

I don't know why the embedded syntax isn't shown properly, though now term list at least doesn't break highlighting.