runtime(vim): Update base-syntax, add legacy header folding
Allow for syntax-based folding of Vim9 script legacy header regions. This is enabled with the "H" flag of the g:vimsyn_folding config variable. closes: #14530 Signed-off-by: Christian Brabandt <cb@256bit.org> Signed-off-by: Doug Kearns <dougkearns@gmail.com>
This commit is contained in:
committed by
Christian Brabandt
parent
5a9f7e6750
commit
ce06493aeb
20
runtime/syntax/testdir/dumps/vim9_legacy_header_fold_00.dump
Normal file
20
runtime/syntax/testdir/dumps/vim9_legacy_header_fold_00.dump
Normal file
@ -0,0 +1,20 @@
|
||||
>++0#0000e05#a8a8a8255|-@1| |1@1| |l|i|n|e|s|:| |"| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |l|e|t| |g|:|v|i|m|s|y|n|_|f|o|l|d|i|n|g| |=| |"|H|"| ||| |s|e|t| |f|d|m|=|s|y|n|t|a|x|-
|
||||
|v+0#af5f00255#ffffff0|i|m|9|s|c|r|i|p|t| +0#0000000&|n+0#e000e06&|o|c|l|e|a|r| +0#0000000&@56
|
||||
@75
|
||||
|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@65
|
||||
@75
|
||||
| +0#0000e05&|#| |s|t|r|i|n|g| |o|n|l|y| |r|e|c|o|g|n|i|s|e|d| |w|i|t|h| |l|e|a|d|i|n|g| |c|h|a|r| +0#0000000&@31
|
||||
@1|"+0#e000002&|u|s|e|l|e|s@1| |s|t|r|i|n|g|"| +0#0000000&@57
|
||||
|~+0#4040ff13&| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
| +0#0000000&@56|1|,|1| @10|A|l@1|
|
||||
20
runtime/syntax/testdir/dumps/vim9_legacy_header_fold_99.dump
Normal file
20
runtime/syntax/testdir/dumps/vim9_legacy_header_fold_99.dump
Normal file
@ -0,0 +1,20 @@
|
||||
|++0#0000e05#a8a8a8255|-@1| |1@1| |l|i|n|e|s|:| |"| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |l|e|t| |g|:|v|i|m|s|y|n|_|f|o|l|d|i|n|g| |=| |"|H|"| ||| |s|e|t| |f|d|m|=|s|y|n|t|a|x|-
|
||||
|v+0#af5f00255#ffffff0|i|m|9|s|c|r|i|p|t| +0#0000000&|n+0#e000e06&|o|c|l|e|a|r| +0#0000000&@56
|
||||
@75
|
||||
|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@65
|
||||
@75
|
||||
| +0#0000e05&|#| |s|t|r|i|n|g| |o|n|l|y| |r|e|c|o|g|n|i|s|e|d| |w|i|t|h| |l|e|a|d|i|n|g| |c|h|a|r| +0#0000000&@31
|
||||
@1>"+0#e000002&|u|s|e|l|e|s@1| |s|t|r|i|n|g|"| +0#0000000&@57
|
||||
|~+0#4040ff13&| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
|~| @73
|
||||
| +0#0000000&@56|1|7|,|2| @9|A|l@1|
|
||||
17
runtime/syntax/testdir/input/vim9_legacy_header_fold.vim
Normal file
17
runtime/syntax/testdir/input/vim9_legacy_header_fold.vim
Normal file
@ -0,0 +1,17 @@
|
||||
" VIM_TEST_SETUP let g:vimsyn_folding = "H" | set fdm=syntax
|
||||
" comment
|
||||
|
||||
if !has('vim9script')
|
||||
# 42 " comment
|
||||
source foo.vim
|
||||
finish
|
||||
endif
|
||||
|
||||
" comment
|
||||
|
||||
vim9script noclear
|
||||
|
||||
# comment
|
||||
|
||||
# string only recognised with leading char
|
||||
"useless string"
|
||||
Reference in New Issue
Block a user