Skip to content

bug: icon virtual text discards dynamic line backgrounds (gitsigns linehl, cursorline, visual) #679

Description

@bytesandwich

Neovim version (nvim -v)

0.12.2

Neovim distribution

N/A

Operating system

MacOs

Terminal emulator / GUI

kitty

Describe the bug

Bullet, checkbox and heading icons are drawn as virtual text that does not pick up
whatever background is already on the line. Any dynamic line-level background is punched out at
exactly the icon cells, leaving Normal colored gaps in the middle of the tint. This happens for me with
lewis6991/gitsigns plugin with linehl = true.

Here is a simple foo.md example. I did a git added with the empty backtick markdown block. Then I added three markdown lines that have symbols in them. It looks to me like they get highlighted by gitsigns with a background color and then render-markdown will then over render replacing symbols and that's where this problem happens. You can see the awkward blank spots:

Image
- [ ] implement the envelope for RMS
* input points -> geometry
# Doing a mark: Input Modal Operator

Expected behavior

Image

Healthcheck output

==============================================================================
render-markdown:                                                          3 ⚠️

render-markdown.nvim [versions] ~
- ✅ OK neovim >= 0.11
- ✅ OK tree-sitter ABI: 15
- ✅ OK plugin: 8.13.0

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

render-markdown.nvim [tree-sitter markdown] ~
- ✅ OK parser: installed
- ✅ OK ABI: 15
- ✅ OK highlights: ~/.local/share/nvim/site/queries/markdown/highlights.scm
- ✅ OK highlighter: enabled

render-markdown.nvim [tree-sitter markdown_inline] ~
- ✅ OK parser: installed
- ✅ OK ABI: 15
- ✅ OK highlights: ~/.local/share/nvim/site/queries/markdown_inline/highlights.scm

render-markdown.nvim [tree-sitter html] ~
- ✅ OK parser: installed
- ✅ OK ABI: 14

render-markdown.nvim [tree-sitter latex] ~
- ⚠️ WARNING parser: not installed
  - ADVICE:
    - disable latex support to avoid this warning
      require("render-markdown").setup({
          latex = { enabled = false },
      })
- ⚠️ WARNING ABI: unknown
  - ADVICE:
    - disable latex support to avoid this warning
      require("render-markdown").setup({
          latex = { enabled = false },
      })

render-markdown.nvim [tree-sitter yaml] ~
- ✅ OK parser: installed
- ✅ OK ABI: 15

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

render-markdown.nvim [latex] ~
- ⚠️ WARNING none installed: { "utftex", "latex2text" }
  - 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

<empty>

Confirmations

  • I have updated this plugin to the latest version using my plugin manager
  • I have updated all treesitter parsers (:TSUpdate)
  • 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

I think this affects other plugins, and cursor-line as well.

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