馃 my neovim config:)
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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