File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ set cpo&vim
33
44let s: on_windows = has (' win32' ) || has (' win64' )
55let s: dict_t = type ({})
6+ let s: list_t = type ([])
67if exists (' v:true' )
78 let s: bool_t = type (v: true )
89else
@@ -44,12 +45,12 @@ endfunction
4445function ! s: create_keyvals (key , val) abort
4546 if type (a: val ) == s: dict_t
4647 return a: key . ' : {' . s: stringize_options (a: val ) . ' }'
48+ elseif type (a: val ) == s: bool_t
49+ return a: key . (a: val == v: true ? ' : true' : ' : false' )
50+ elseif type (a: val ) == s: list_t
51+ return a: key . ' : [' . join (a: val ,' ,' ) . ' ]'
4752 else
48- if type (a: val ) == s: bool_t
49- return a: key . (a: val == v: true ? ' : true' : ' : false' )
50- else
51- return a: key . ' : ' . a: val
52- endif
53+ return a: key . ' : '' ' . a: val . ' ' ' '
5354 endif
5455endfunction
5556
You can’t perform that action at this time.
0 commit comments