We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am testing a patch from vim/vim#14057, and together with this plugin it breaks the syntax.
Download the syntax as following:
mkdir "$HOME/.vim/syntax" -p curl -s https://raw.githubusercontent.com/vim/vim/21c6d8b5b6ef510c9c78b9dfb89a41146599505f/runtime/syntax/python.vim > ~/.vim/syntax/python.vim
And open the test.py file with the following content
VAR = ( "placeholderplaceholderplaceholderplaceholderplaceholderplaceholderplaceholder" if not bool() else f"placeholder {bool()}" ) if not VAR: logging.debug("placeholder") _ = VAR
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 help
$MYVIMRC
let g:rainbow_conf = { \ 'python': { \ 'parentheses_options': 'contains=@NopythonFStringContained', \ }, \}
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.
The text was updated successfully, but these errors were encountered:
Thanks for your report, do you know what syntax rules this patch is adding?
Sorry, something went wrong.
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.
contains=pythonFStringExpression
start="."
No branches or pull requests
Describe the bug
I am testing a patch from vim/vim#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.
The text was updated successfully, but these errors were encountered: