forked from aniani/vim
runtime(vim): Update base-syntax, improve variable matching
- Match variables after operators, including line continuations. - Match option variables without leading whitespace. - Explicitly match expression subscripts. - Match Vim9 variables in LHS of assignments and method calls. - Match option variables (&option) with a dedicated syntax group like environment variables. - Match list literals, fixes: #5830 - Match :{un}lockvar arguments. - Match registers and environment variables in :let unpack lists. - Match lambda expressions - Match Vim9 scope blocks - Match variables in :for subject - Highlight user variables with Normal - Improve this/super keyword matching, fixes: #15970 closes: #16476 Signed-off-by: Doug Kearns <dougkearns@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
54d7f18c38
commit
1aa287e048
@@ -85,6 +85,21 @@ echo 0zFF00ED015DAF
|
||||
echo 0zFF00.ED01.5DAF
|
||||
echo 0zFF.00.ED.01.5D.AF
|
||||
|
||||
" List
|
||||
|
||||
echo []
|
||||
echo [42]
|
||||
echo [[11, 12], [21, 22], [31, 32]]
|
||||
echo [1,
|
||||
\ 2,
|
||||
\ 3,
|
||||
\ 4
|
||||
\]
|
||||
echo [1, 'two', 1 + 2, "fo" .. "ur"]
|
||||
|
||||
" Issue #5830 (Incorrect syntax highlighting in Vim script when omitting space in list of string)
|
||||
let l = ['a','b','c']
|
||||
|
||||
" Operators
|
||||
|
||||
" Ternary
|
||||
@@ -169,9 +184,26 @@ echo expr !~? expr
|
||||
echo expr is? expr
|
||||
echo expr isnot? expr
|
||||
|
||||
" Unreported issue (incorrectly matches as "echo vimNumber *vimCommand* vimNumber")
|
||||
" Unreported issue ("is" incorrectly matches as "echo vimNumber *vimCommand* vimNumber")
|
||||
echo 42 is 42
|
||||
|
||||
" Line continuation
|
||||
let foo = foo +
|
||||
\
|
||||
"\ comment
|
||||
\
|
||||
"\ comment
|
||||
\ bar +
|
||||
\ "baz"
|
||||
|
||||
let foo = foo +
|
||||
"\ comment
|
||||
\
|
||||
"\ comment
|
||||
\
|
||||
\ bar +
|
||||
\ "baz"
|
||||
|
||||
|
||||
" Issue #16221 (vimString becomes vimVar when preceded by !)
|
||||
let bar = !'g:bar'->exists()
|
||||
|
Reference in New Issue
Block a user