Skip to content

Support setting buftype_allowlist to work around issues with nvim-docs-view #36

Open
@swaits

Description

@swaits

Here's my config (lazy.vim):

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions