neorg icon indicating copy to clipboard operation
neorg copied to clipboard

Heading + Todo + Folding (+ concealer?) = trouble

Open j-xella opened this issue 1 year ago • 2 comments

Prerequisites

  • [X] I am using the latest stable release of Neovim
  • [X] I am using the latest version of the plugin

Neovim Version

NVIM v0.10.0-dev-1361+g0892c1cd9

Neorg setup

-- neorg support
-- https://github.com/nvim-neorg/neorg

return {
  {
    "nvim-neorg/neorg",
    build = ":Neorg sync-parsers",
    dependencies = {
      "nvim-lua/plenary.nvim",
      "nvim-treesitter/nvim-treesitter",
      "nvim-tree/nvim-web-devicons",
    },
    cmd = { 'Neorg', },
    ft = { 'norg', },
    config = function(_,_)
      require("neorg").setup {
        load = {
          ["core.defaults"] = {},
          ["core.dirman"] = {
            config = {
              default_workspace = "dev",
              workspaces = {
                personal = "hidden",
                dev      = "hidden",
              },
            },
          },
          ["core.keybinds"] = { -- https://github.com/nvim-neorg/neorg/wiki/User-Keybinds
            config = {
              hook = function(keybinds)
                keybinds.remap_event( "norg", "n", "<C-1>", "core.qol.todo_items.todo.task_cycle" ) -- Like in OneNote

                vim.opt.conceallevel = 2
              end,
            },
          },
          ["core.qol.todo_items"] = {
            config = {
              order = {
                { "undone", " " },
                { "pending", "-" },
                { "done", "x" },
              },
            },
          },
          ["core.concealer"] = {},
          ["core.summary"] = {},
          ["core.ui.calendar"] = {},
        }
      }
    end,
  },
}

Actual behavior

Watch the second-level heading on line 32. In insert mode, as is:

image

Now in normal mode, concealed. Unfolded - looks OK:

image

Same heading, folded. Looks BAD:

image

Expected behavior

Now removing the TODO marker:

image

Normal, unfolded:

image

Folded - GOOD:

image

Steps to reproduce

  1. Create a heading
  2. Make it a todo item, let's say done state
  3. Fold it

The fold description should look very similar to the unfolded version, but in reality I can see both textual representation of TODO items and iconic one, shifted and overwriting the heading text.

Potentially conflicting plugins

No response

Other information

No response

Help

None

Implementation help

No response

j-xella avatar Oct 18 '23 11:10 j-xella

I always thought it was becase of wrong unicode handling but it seems like it's because of todo marker with concealer. Anyways, same here, almost always had this bug.

Anrock avatar Oct 18 '23 12:10 Anrock

I have the same issue. It makes me avoid using todos in headings. So a bugfix would be very nice.

OHANAN1 avatar Nov 28 '23 20:11 OHANAN1