-
Notifications
You must be signed in to change notification settings - Fork 202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lines in man pages break prematurely #311
Comments
I used soft wrap ( But is is not an unknown issue and they previously set hard wrap to be more fool prove (neovim/neovim#10748, neovim/neovim#11436). Nevertheless I opened an issue, because I would expect that Neovim would be able to create multi line cells in man pages, even when using soft wrap: neovim/neovim#29249. In view of the facts I need to withdraw my recommendation to set soft wrap as default, for now. Therefore I think the best solution for NvChad would be to disable the left padding when filetype man is detected. Another solution, would be to use hard wrap and subtract the padding from the terminal columns and set this as |
does this happen with other neovim configs? |
I tested it with LazyVim. Soft WrapThey seem to default to soft wrap. When testing with Hard WrapI've done following steps to test hard wrap in LazyVim:
They also have a padding on the right side and therefore break lines prematurely. |
Describe the bug
Lines in man pages break prematurely. This reason seem to be the additional padding on the left.
This does not happen in Neovim without a config. So it need to come somewhere from NvChad, but I couldn't figure out, which option sets that additional padding.
To Reproduce
Steps to reproduce the behavior:
export MANPAGER='nvim +Man!'
man namespaces
This does also happen when open the man pages from inside Neovim with
:Man namespaces
or the respective Telescope picker.Expected behavior
Lines should not prematurely break in man pages. I can imagine two solutions:
man
is detected. I don't know how, because I don't know how and where the padding is set.vim.g.man_hardwrap=0
. See:h man
for details. This also enables the reformatting of the content when the window is resized. I recommend to set this option as default.Screenshots
man page with no config:
man page with unmodified NvChad starter config. I marked the first 4 bad linebreaks red, but when you look into the chapter The namespaces API you can see that nearly every line has a prematurely linebreak:
Desktop (please complete the following information):
Additional context
It is important to note that there are differences in opening the man page by the
man
command or from inside Neovim. When using the man command on the shell the man page is pre-formatted withgroff
and the soft_wrapping setting is useless.:h man
tells the workaround toexport MANWIDTH=999
, but this will result in a broken title bar and therefore I won't recommend that. A better solution is to redefine theman
command in the shell (as recommended in:h man
):The text was updated successfully, but these errors were encountered: