call prop_type_add( 'Virtual', #{ highlight: 'Error' } ) call prop_type_add( 'Function', #{ highlight: 'Function' } ) call prop_type_add( 'Identifier', #{ highlight: 'Identifier' } ) " function( call, argument, here ) call prop_add( 5, 5, #{ type: 'Function', length: len( 'function' ) } ) call prop_add( 5, 15, #{ type: 'Identifier', length: len( 'call' ) } ) call prop_add( 5, 21, #{ type: 'Identifier', length: len( 'argument' ) } ) call prop_add( 5, 31, #{ type: 'Identifier', length: len( 'here' ) } ) call prop_add( 5, 15, #{ type: 'Virtual', text: 'name1:' } ) call prop_add( 5, 21, #{ type: 'Virtual', text: 'name2:' } ) call prop_add( 5, 31, #{ type: 'Virtual', text: 'name3:' } )
vim --clean -S test.vim test.vim
See how the 'name1:', etc. are not rendered. They also cause the cursor to be in the wrong position in the line (move cursor along line 5 to replicate).
Reversing the calls, so that the 'virtual text' property is added first resolves it and works well:
call prop_type_add( 'Virtual', #{ highlight: 'Error' } ) call prop_type_add( 'Function', #{ highlight: 'Function' } ) call prop_type_add( 'Identifier', #{ highlight: 'Identifier' } ) " function( call, argument, here ) call prop_add( 5, 15, #{ type: 'Virtual', text: 'name1:' } ) call prop_add( 5, 21, #{ type: 'Virtual', text: 'name2:' } ) call prop_add( 5, 31, #{ type: 'Virtual', text: 'name3:' } ) call prop_add( 5, 5, #{ type: 'Function', length: len( 'function' ) } ) call prop_add( 5, 15, #{ type: 'Identifier', length: len( 'call' ) } ) call prop_add( 5, 21, #{ type: 'Identifier', length: len( 'argument' ) } ) call prop_add( 5, 31, #{ type: 'Identifier', length: len( 'here' ) } )
I'd expect these two to be equivalent.
9.0.181
macOS arm64
No response
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Closed #10879 as completed via 952c9b0.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()