Is this a bug? mini.align inserts space at beginning of line when aligning pipes with "ga|" #1684
-
Contributing guidelines
Module(s)mini.align QuestionI noticed this behavior while using mini.align. If I use Please see the following video demonstration: 2025-03-16-mini-align-bug-demo.mp4Here's the -- This is the init.lua that is running right now.
-- Put this at the top of 'init.lua'
local path_package = vim.fn.stdpath('data') .. '/site'
local mini_path = path_package .. '/pack/deps/start/mini.nvim'
if not vim.loop.fs_stat(mini_path) then
vim.cmd('echo "Installing `mini.nvim`" | redraw')
local clone_cmd = {
'git', 'clone', '--filter=blob:none',
-- Uncomment next line to use 'stable' branch
-- '--branch', 'stable',
'https://github.com/echasnovski/mini.nvim', mini_path
}
vim.fn.system(clone_cmd)
vim.cmd('packadd mini.nvim | helptags ALL')
end
require('mini.align').setup()
--[[
Before aligning, the first pipe was directly below the letter "B".
| example | example | example | example | example |
| example| example | example | example | example
]] |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
This is somewhat expected because
I'll take a look if there is a reasonable workaround for not adding merge space to the left (to more strongly preserve indentation), but no promises. |
Beta Was this translation helpful? Give feedback.
-
This should now be resolved on latest |
Beta Was this translation helpful? Give feedback.
-
Thanks for the fix! |
Beta Was this translation helpful? Give feedback.
This should now be resolved on latest
main
. I indeed opted for adjusting for this special case as preserving indentation is already a case withtrim()
step. Thanks again for noticing this!