Description
When using neovim as a manpage viewer via the +Man! command line argument, no-neck-pain somehow interferes with the parsing of the manpage, and typical manpage-mode functions do not work.
This only happens (as the configuration option would suggest) when first entering neovim. If one is already inside a running instance of neovim, calling up a manpage via the K keybind will work correctly. If one is viewing a garbled manpage as happens when this option is enabled, running :Man! from that buffer will also correctly load the buffer as parsed manpage.
Happy to perform additional troubleshooting if necessary.
I've confirmed this occurs in both the latest (dev) version of no-neck-pain and in the stable version, although I only noticed this happening within the last month.
Neovim version
0.10.3
Steps to reproduce
- Configure no-neck-pain and set
enableOnVimEnter = true in the config table.
- Configure neovim as the manpage viewer, via setting the
MANPAGER environment variable. Ex: export MANPAGER="nvim +Man!"
- View a man page via
man. Ex: man man
- Observe that no-neck-pain is loaded, that the manpage buffer is showing unparsed terminal escape sequences, that the buffer is not read-only, and
gO does not open a location list of the manpage outline.
Screenshot of what the buffer looks like with unparsed escape sequences.

Relevant log output
[no-neck-pain.nvim@enable_on_vim_enter] calling enable for tab 1
[no-neck-pain.nvim@set_tab] registered new tab 1
[no-neck-pain.nvim@enable_on_vim_enter] computed columns: 0 - 1
[no-neck-pain.nvim@enable_on_vim_enter] init called on tab 1 for current window 1000
[no-neck-pain.nvim@get_side_width:left] 0/255 after integrations - 1 columns remaining
[no-neck-pain.nvim@get_side_width:left] 126/255 after splits - final 64
[no-neck-pain.nvim@get_side_width:right] 0/255 after integrations - 1 columns remaining
[no-neck-pain.nvim@get_side_width:right] 126/255 after splits - final 64
[no-neck-pain.nvim@colors.init] skipping color initialization for side left
[no-neck-pain.nvim@colors.init] skipping color initialization for side right
[no-neck-pain.nvim@left] resizing 1001 with padding 64
[no-neck-pain.nvim@right] resizing 1002 with padding 64
[no-neck-pain.nvim@enable_on_vim_enter] rerouting focus of 1002 to 1000
[no-neck-pain.nvim@enable_on_vim_enter] computed columns: 1 - 3
[no-neck-pain.nvim@enable_on_vim_enter] init called on tab 1 for current window 1000
[no-neck-pain.nvim@get_side_width:left] 0/255 after integrations - 1 columns remaining
[no-neck-pain.nvim@get_side_width:left] 126/255 after splits - final 64
[no-neck-pain.nvim@get_side_width:right] 0/255 after integrations - 1 columns remaining
[no-neck-pain.nvim@get_side_width:right] 126/255 after splits - final 64
[no-neck-pain.nvim@left] resizing 1001 with padding 64
[no-neck-pain.nvim@right] resizing 1002 with padding 64
[no-neck-pain.nvim@enable_on_vim_enter] rerouting focus of 1001 to 1000
[no-neck-pain.nvim@enable_on_vim_enter] >> debouncer triggered
[no-neck-pain.nvim@enable_on_vim_enter] init called on tab 1 for current window 1000
[no-neck-pain.nvim@get_side_width:left] 0/255 after integrations - 1 columns remaining
[no-neck-pain.nvim@get_side_width:left] 126/255 after splits - final 64
[no-neck-pain.nvim@get_side_width:right] 0/255 after integrations - 1 columns remaining
[no-neck-pain.nvim@get_side_width:right] 126/255 after splits - final 64
[no-neck-pain.nvim@left] resizing 1001 with padding 64
[no-neck-pain.nvim@right] resizing 1002 with padding 64
Error executing luv callback:
vim/_editor.lua:0: E5560: nvim_echo must not be called in a lua loop callback
stack traceback:
[C]: in function 'nvim_echo'
vim/_editor.lua: in function 'notify'
...vim/lazy/no-neck-pain.nvim/lua/no-neck-pain/util/log.lua:40: in function 'debug'
...vim/lazy/no-neck-pain.nvim/lua/no-neck-pain/util/api.lua:108: in function <...vim/lazy/no-neck-pain.nvim/lua/no-neck-pain/util/api.lua:104>
[C]: in function 'wait'
/usr/share/nvim/runtime/lua/vim/_system.lua:99: in function 'wait'
/usr/share/nvim/runtime/lua/man.lua:22: in function 'system'
/usr/share/nvim/runtime/lua/man.lua:254: in function 'get_path'
/usr/share/nvim/runtime/lua/man.lua:803: in function 'init'
/usr/share/nvim/runtime/lua/man.lua:815: in main chunk
[C]: in function 'require'
/usr/share/nvim/runtime/plugin/man.lua:7: in function </usr/share/nvim/runtime/plugin/man.lua:6>
[no-neck-pain.nvim@WinEnter:1000] computed columns: 3 - 3
[no-neck-pain.nvim@enable_on_vim_enter] init called on tab 1 for current window 1000
[no-neck-pain.nvim@get_side_width:left] 0/255 after integrations - 1 columns remaining
[no-neck-pain.nvim@get_side_width:left] 126/255 after splits - final 64
[no-neck-pain.nvim@get_side_width:right] 0/255 after integrations - 1 columns remaining
[no-neck-pain.nvim@get_side_width:right] 126/255 after splits - final 64
[no-neck-pain.nvim@left] resizing 1001 with padding 64
[no-neck-pain.nvim@right] resizing 1002 with padding 64
[no-neck-pain.nvim@enable_on_vim_enter] >> debouncer triggered
Self-service
Description
When using neovim as a manpage viewer via the
+Man!command line argument, no-neck-pain somehow interferes with the parsing of the manpage, and typical manpage-mode functions do not work.This only happens (as the configuration option would suggest) when first entering neovim. If one is already inside a running instance of neovim, calling up a manpage via the
Kkeybind will work correctly. If one is viewing a garbled manpage as happens when this option is enabled, running:Man!from that buffer will also correctly load the buffer as parsed manpage.Happy to perform additional troubleshooting if necessary.
I've confirmed this occurs in both the latest (dev) version of
no-neck-painand in the stable version, although I only noticed this happening within the last month.Neovim version
0.10.3
Steps to reproduce
enableOnVimEnter = truein the config table.MANPAGERenvironment variable. Ex:export MANPAGER="nvim +Man!"man. Ex:man mangOdoes not open a location list of the manpage outline.Screenshot of what the buffer looks like with unparsed escape sequences.

Relevant log output
Self-service