From 1c83e43f27394d8bcb32d72ee2a052d3867788cc Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 27 Jul 2026 06:31:55 +0800 Subject: [PATCH] vim-patch:916809a: runtime(python): highlight the 'lazy' soft keyword Lazy imports (PEP 810, to be released in Python 3.15) introduces a `lazy` soft keyword that's recognized when it precedes a `from` or `import` keyword. closes: vim/vim#20342 https://github.com/vim/vim/commit/916809ae1e3e562e0a6220a6e7e08f38b8a23b62 Co-authored-by: Jon Parise --- runtime/syntax/python.vim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/runtime/syntax/python.vim b/runtime/syntax/python.vim index 24c2657e15..aa5c36e0ad 100644 --- a/runtime/syntax/python.vim +++ b/runtime/syntax/python.vim @@ -6,6 +6,7 @@ " 2025 Dec 03 by Vim Project: highlight t-strings #18679 " 2026 Jan 26 by Vim Project: highlight constants #18922 " 2026 Mar 11 by Vim Project: fix number performance #19630 +" 2026 May 27 by Vim Project: highlight `lazy` soft keyword (PEP 810) #20342 " Credits: Neil Schemenauer " Dmitry Vasiliev " Rob B @@ -120,6 +121,7 @@ syn keyword pythonAsync async await " for more on this. syn match pythonConditional "^\s*\zscase\%(\s\+.*:.*$\)\@=" syn match pythonConditional "^\s*\zsmatch\%(\s\+.*:\s*\%(#.*\)\=$\)\@=" +syn match pythonInclude "^\s*\zslazy\ze\s\+\%(from\|import\)\>" syn match pythonStatement "\