neorg icon indicating copy to clipboard operation
neorg copied to clipboard

Concealer breaks when you clear the line (`cc` or `S`)

Open wadeduvall opened this issue 2 years 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.9.1 Build type: Release LuaJIT 2.1.0-beta3

Neorg setup

    require("neorg").setup {
      load = {
        ["core.defaults"] = {}, -- Loads default behaviour
        ["core.concealer"] = {}, -- Adds pretty icons to your documents
        ["core.dirman"] = { -- Manages Neorg workspaces
          config = {
            workspaces = {
              notes = "~/notes",
            },
          },
        },
      }

Actual behavior

Enter any line that will invoke the concealer (I tried - * and *********). Exit insert mode. Clear the line using either cc or S. You are now in insert mode, and the concealer is still hiding whatever symbols you have entered.

Before cc screenshot: Screenshot 2023-08-31 at 9 05 10 PM

Immediately after (notice I am in insert mode) screenshot: Screenshot 2023-08-31 at 9 05 21 PM

It is now impossible to get the concealer to conceal this. I can provide a video if that helps.

Expected behavior

I would expect either:

  1. The entire line is cleared with nothing on it at all
  2. The text is cleared, the concealer unhides the text (simulated screenshot of what this looks like): Screenshot 2023-08-31 at 9 09 09 PM

Steps to reproduce

  1. Enter any line that will invoke the concealer.
  2. Exit insert mode.
  3. Clear the line using either cc or S
  4. Symbol is now stuck concealed.

Potentially conflicting plugins

Here are all the plugins I use:

alpha-nvim bufferline colorscheme comment indent-blankline lualine mason neodev neorg null-ls nvim-autopairs nvim-cmp nvim-dap-ui nvim-dap nvim-lspconfig nvim-tree nvim-treesitter project telescope which-key

Other information

I would love to not select 'None' on the Help question but I know very little lua (I literally learned while writing my neovim config) and I'm guessing the concealer is a fairly complex bit of code.

Help

None

Implementation help

No response

wadeduvall avatar Sep 01 '23 01:09 wadeduvall

You could try starting a new line with o and then deleting that new line. The redundant icon should then disappear.

Visual artifacts caused by 'cc' is a known issue and it won't be fixed (elegantly) until either neovim or treesitter can give more reliable and more precise notice on line modifications made by 'cc' and several other commands.

champignoom avatar Sep 01 '23 07:09 champignoom

@champignoom thanks for the update. I understand it's a very alpha (but also very usable) plugin, but just wanted to make sure it was on your radar.

wadeduvall avatar Sep 10 '23 19:09 wadeduvall

Seems to be fixed on nvim v0.10.1 and the latest neorg from main

benlubas avatar Aug 08 '24 16:08 benlubas