From b399a13f70887a9835c37710eb8d703ec01524b2 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 6 Sep 2025 07:08:08 +0800 Subject: [PATCH] vim-patch:f1212a7: runtime(python): Do not match contained identifiers as pythonType related: vim/vim#17962 closes: vim/vim#18206 https://github.com/vim/vim/commit/f1212a7b4554f2f544b581f7e819d6ef67c5e9ad Co-authored-by: Rob B --- runtime/syntax/python.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/syntax/python.vim b/runtime/syntax/python.vim index ec3be3422b..b2f866b8b3 100644 --- a/runtime/syntax/python.vim +++ b/runtime/syntax/python.vim @@ -229,10 +229,10 @@ syn region pythonFStringField \ start=/{/ \ end=/\%(=\s*\)\=\%(!\a\s*\)\=\%(:\%({\_[^}]*}\|[^{}]*\)\+\)\=}/ \ contained - \ contains=ALLBUT,pythonFStringField,pythonClass,pythonFunction,pythonDoctest,pythonDoctestValue,@Spell + \ contains=ALLBUT,pythonFStringField,pythonClass,pythonFunction,pythonType,pythonDoctest,pythonDoctestValue,@Spell syn match pythonFStringFieldSkip /(\_[^()]*)\|\[\_[^][]*]\|{\_[^{}]*}/ \ contained - \ contains=ALLBUT,pythonFStringField,pythonClass,pythonFunction,pythonDoctest,pythonDoctestValue,@Spell + \ contains=ALLBUT,pythonFStringField,pythonClass,pythonFunction,pythonType,pythonDoctest,pythonDoctestValue,@Spell " Doubled braces are not replacement fields syn match pythonFStringSkip /{{/ transparent contained contains=NONE