You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
return {
"andrewferrier/wrapping.nvim",
keys= {
{ "<leader>uw", "<cmd>ToggleWrapMode<cr>", desc="Toggle Hard/Soft Mode", mode="n" },
},
opts= {
softener= {
{ markdown=true },
{ ["nvim-docs-view"] =true }, -- this is not working
},
},
}
The nvim-docs-view filetype is from the buffer opened by the nvim-docs-view plugin.
This plugin automatically shows the hover text (ie usually docs) for whatever is under the cursor.
By default, it doesn't wrap anything. When I switch to that window and toggle wrapping I get the message that it switched to hard mode. When I toggle it a second time, it says it switched to soft mode, and indeed the documentation text is then properly wrapping.
Note that I used the ["nvim-docs-view"] syntax because hyphens are not legal in the normal key = value syntax.
The text was updated successfully, but these errors were encountered:
Hi, sorry for the long delay, I eventually got wrong to looking at this. I think I've fixed this issue in commit 4c87a23. There were two issues; one the way that wrapping.nvim detects filetype changes, which I've enhanced, and secondly the fact that it was discard all buffers with buftype not blank. nvim-docs-view uses a nofile buffer. I've added an additional undocumented option to support this.
If you can please test this (with the latest master branch), that would be great, if this works I'll document it and release it properly.
andrewferrier
changed the title
trouble forcing soft wrap mode on specific filetype
Support setting buftype_allowlist to work around issues with nvim-docs-view
May 25, 2024
Here's my config (lazy.vim):
The
nvim-docs-view
filetype is from the buffer opened by the nvim-docs-view plugin.This plugin automatically shows the hover text (ie usually docs) for whatever is under the cursor.
By default, it doesn't wrap anything. When I switch to that window and toggle wrapping I get the message that it switched to hard mode. When I toggle it a second time, it says it switched to soft mode, and indeed the documentation text is then properly wrapping.
Note that I used the
["nvim-docs-view"]
syntax because hyphens are not legal in the normalkey = value
syntax.The text was updated successfully, but these errors were encountered: