Skip to content

bug: hover display has linebreak, when the hover window is narrow #408

@kmoschcau

Description

@kmoschcau

Neovim version (nvim -v)

v0.12.0-dev-197+g1dbede5b93

Neovim distribution

N/A

Operating system

Windows 11

Terminal emulator / GUI

WezTerm / Neovide

Describe the bug

When the hover content is really narrow, the rendered markdown is wider than the window width and introduces a line break. This means I have to go into the hover window to see what it wants to show me.

Here is a screenshot of the issue:
Image

󰛦 typescript
↪

Here is a screenshot of the hover buffer contents:
Image

\`\`\`typescript
const key: string
\`\`\`

(The cursor is on the first line in the first column. The closing backticks for the code block are off-screen.)

The issue seems to be only the first line. When I put my cursor there or scroll it off-screen, everything works as expected.

Expected behavior

The first line should be narrow enough, that it does not break across lines.

Healthcheck output

==============================================================================
render-markdown:                                                          1 ⚠️

render-markdown.nvim [version] ~
- ✅ OK plugin 8.3.5
- ✅ OK neovim >= 0.11

render-markdown.nvim [configuration] ~
- ✅ OK valid

render-markdown.nvim [treesitter] ~
- ✅ OK markdown: parser installed
- ✅ OK markdown_inline: parser installed
- ✅ OK latex: parser installed
- ✅ OK html: parser installed
- ✅ OK markdown: highlight enabled

render-markdown.nvim [icons] ~
- ✅ OK using: mini.icons

render-markdown.nvim [executables] ~
- ⚠️ WARNING latex2text: not installed
  - ADVICE:
    - Disable latex support to avoid this warning
    - require('render-markdown').setup({ latex = { enabled = false } })

render-markdown.nvim [conflicts] ~
- ✅ OK headlines: not installed
- ✅ OK markview: not installed
- ✅ OK obsidian: not installed

Plugin configuration

Default Configuration

Plugin error log

N/A

Confirmations

  • I have updated this plugin to the latest version using my plugin manager
  • I have provided the text contained in all screenshots as raw text in this issue. This means if there is a screenshot below it is the copy pasted contents of the file in the screenshot. I understand that my issue will be closed if I have not.

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions