Skip to content

bug: Rendering links inside checked checkbox #518

@d4rkd3v1l

Description

@d4rkd3v1l

Neovim version (nvim -v)

0.11.4

Neovim distribution

LazyVim

Operating system

macOS

Terminal emulator / GUI

Ghostty

Describe the bug

When using a wiki link inside a checked checkbox item, the "checked" highlight group is not applied to the wiki icon.
Doing the same on a regular (web) link, additionally the highlight group is not applied to the text portion of the link as well.
I already tried to debug this and look into the code myself, but I'm totally lost as I'm a complete noob regarding lua, nvim and its highlight group system. Also using :InspectTree didn't really work out for debugging, as I only see the unrendered stuff there, I guess.
However, any help is highly appreciated.

Image

Raw text:

- [ ] Unchecked
- [x] Checked
- [ ] [[unchecked]]
- [x] [[checked]]
- [ ] <https://unchecked>
- [x] <https://checked>

Expected behavior

I expect, that on a checked checkbox item, the "checked" highlight group is applied to everything.

Healthcheck output

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

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

render-markdown.nvim [configuration] ~
- ❌ ERROR checkbox.position - expected: nil, got: string

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

render-markdown.nvim [tree-sitter markdown_inline] ~
- ✅ OK parser: installed
- ✅ OK ABI: 14
- ✅ OK highlights: ~/.local/share/nvim/lazy/nvim-treesitter/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: 14

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

checkbox = {
    checked = {
      icon = "   󰄲 ",
      scope_highlight = "RenderMarkdownChecked"
    },
    custom = {
      todo = {
        rendered = "   󰥔 "
      }
    },
    position = "inline",
    unchecked = {
      icon = "   󰄱 "
    }
  },
  code = {
    border = "none",
    inline_pad = 1,
    language_pad = 1,
    right_pad = 1,
    sign = false,
    width = "block"
  },
  file_types = {
    [2] = "norg",
    [3] = "rmd",
    [4] = "org",
    [5] = "codecompanion"
  },
  heading = {
    icons = { "󰎤 ", "󰎧 ", "󰎪 ", "󰎭 ", "󰎱 ", "󰎳 " },
    right_pad = 1,
    sign = false,
    width = "block"
  },
  link = {
    custom = {
      youtube2 = {
        icon = "󰗃 ",
        pattern = "youtu%.be"
      }
    },
    wiki = {
      body = <function 1>
    }
  },
  pipe_table = {
    border_enabled = false,
    style = "normal"
  },
  win_options = {
    conceallevel = {
      default = 0
    }
  }

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