robin/ivy
my custom neovim config
git clone https://git.robinwobin.dev/robin/ivy
ef81c00
main
1local justify_right_second_col =function ( parts , _ ) 2local target_width =vim . bo . textwidth > 0 and vim . bo . textwidth or 80 3 4-- For the line 'aaa *aaa*' the row is `{ 'aaa', ' ', '*aaa*'}` 5for _ , row in ipairs ( parts ) do 6-- Make sure that separator column doesn't affect 7row [ 2 ] ="" 8-- Justify second column so that its right part is at `target_width` 9row [ 3 ] =string . rep ( " " , target_width - vim . fn . strchars ( row [ 1 ]) - vim . fn . strchars ( row [ 3 ])) .. row [ 3 ] 10end 11end 12 13local align_helptag =function ( steps , opts ) 14-- Split based on whitespace 15opts . split_pattern ="%s+" 16steps . justify =MiniAlign . new_step ( "justify_helptag" , justify_right_second_col ) 17end 18 19vim . b . minialign_config ={ modifiers ={ [ "*" ] =align_helptag } }