Open Felixoid opened 1 month ago
Thanks for your report, do you know what syntax rules this patch is adding?
Reproduced that.
The reproduce step is:
:syn clear
:source python.vim
:RainbowToggleOn
I have tried to compare 4 cases:
Syntax under line2 col14 is:
Let's check the syntax rules
syn region pythonFStringReplacement matchgroup=pythonFStringBrace start=+{+ end=+}+ contained contains=pythonFStringExpression
syn region pythonFStringExpression
\ start="." end="\ze[=!:}]"
\ contained contains=@pythonExpression
\ nextgroup=pythonFStringEquals,pythonFStringConversion,pythonFStringFormatSpec
Seems like contains=pythonFStringExpression
and start="."
caused this issue.
Describe the bug
I am testing a patch from https://github.com/vim/vim/pull/14057, and together with this plugin it breaks the syntax.
To Reproduce
Download the syntax as following:
And open the test.py file with the following content
The closing bracket in f-string is white for some reason, and the whole following block is a part of string
I tried the following config in
$MYVIMRC
. It doesn't helpExpected behavior
F-string and rainbow shouldn't break each other. I am glad it's caught at the development phase. Hopefully, it could be solved before the release.