kaarmu / typst.vim

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

`TypstMarkupItalicError` syntax error. #61

Closed Adversarr closed 10 months ago

Adversarr commented 10 months ago

Maybe there is an error in regex:

https://github.com/kaarmu/typst.vim/blob/98de7530b0f3bd62a14054a7d4937a198648670d/syntax/typst.vim#L288

The following equation should not be marked as an error.

image
kaarmu commented 10 months ago

Thank you for reporting this. Are you on the latest version of typst.vim? If the problem is there in the latest commit then could you provide the snippet so I can copy it?

Adversarr commented 10 months ago

The latest commit still has the problem.

I don't think use syntax-highlighting to find errors in typst file is a good idea, imbo. The syntax file should only find the correct syntax of typst, just like the syntax file in vim-markdown. To find the syntax errors, we can use typst-lsp.

Maybe just remove the highlighting of these errors is a good idea?

kaarmu commented 10 months ago

That is a fair opinion. I do think that there is value to highlight (syntactic) errors but usability comes first. I will comment it out for now but leave it in there to possibly revisit the feature in the future.