Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Concealer Issues Thread #292

Open
vhyrro opened this issue Jan 1, 2022 · 165 comments
Open

Concealer Issues Thread #292

vhyrro opened this issue Jan 1, 2022 · 165 comments
Labels
discussion Issue related to discussions, in preparation of a feature or bug fixes. module: existing modules Issue related to existing Modules

Comments

@vhyrro
Copy link
Member

vhyrro commented Jan 1, 2022

Hey! This thread exists to basically catch all of the bugs that the new concealer implementation may be causing. Post your problems here!
Aand here's the longer version of the above TL;DR:

Good News

Let's start with the great news: we've massively improved the performance of Neorg's concealer.

I wish I were joking but it's gotten to the point where the bottleneck is no longer Neorg but the code that performs treesitter highlighting in neovim 😂. I did a bunch of testing on over 100k+ loc Neorg documents and after doing :TSBufDisable highlight to prevent the lag that TS was causing things still manage to work smoothly on my machine.

The bad news?

It's definitely not bug free.

Now that our concealer does updates incrementally there's definitely a chance that it'll miss a line or two when concealing in certain circumstances. If you have a problem with the concealer, or something doesn't work as intended, please post your issue here!.
I'll be trying to fix them as I go.

A feature was dropped...

With the dawn of the more performant concealer we've temporarily dropped the TODO item completion level feature - you know, the one that displayed (0 of 3) [0% complete] on headings when they had a TODO list under them? It's gone for now.

I suppose I owe you an explanation as to why we've decided to do this. Before our update the concealer would reparse the entire buffer every single time you changed some text or left insert mode. As you can imagine this made it really slow. Just to clarify we didn't want to make it this bad-performing in the first place, but there were certain bugs in nvim_buf_attach that prevented us from properly doing incremental updates then.

The thing is now that everything is happening incrementally we cannot properly recalculate TODO item counts without requiring more context than a single line - and requiring more context greatly slows down the concealer again.

We'll be working hard on trying to bring it back, but we really wanted to push these new changes to you guys without having you wait another week.

UPDATE: Forgot to update this thread but that has been reimplemented now as well. If you have problems with the TODO item completion levels then be sure to let me know here too!

Hope you understand!

@vhyrro vhyrro pinned this issue Jan 1, 2022
@vhyrro
Copy link
Member Author

vhyrro commented Jan 1, 2022

First bug I found myself: markup concealing was not autotriggering on files lower than 1250 lines, that's been fixed in bfe3056 now :)

@danymat danymat added the module: existing modules Issue related to existing Modules label Jan 2, 2022
@max397574
Copy link
Contributor

Concealing on wrapped links is broken:
wrapped:
Screenshot 2022-01-03 at 17 19 12

not wrapped:
Screenshot 2022-01-03 at 17 18 54

@danymat
Copy link
Member

danymat commented Jan 4, 2022

The : on https://is concealed:
Capture d’écran 2022-01-04 à 11 38 56

Without conceal:

Capture d’écran 2022-01-04 à 11 39 22

@mrossinek
Copy link
Member

Concealing on wrapped links is broken:

This is potentially tricky with how things are done currently in the concealer. I will need to take a look at Vhyrro's rewritten code though since there have been quite some changes. The problem will be that we need to iterate the char in the TS range one by one rather than just rely on the length of the node.

@mrossinek
Copy link
Member

mrossinek commented Jan 4, 2022

The : on https:// is concealed:

Yes, I have encountered this too. The problem is that the : get's recognized as a link_modifier. I will try if I can fix the TS parser to disregard single link_modifier nodes (i.e. if they do not occur in pairs). That should fix this.

On another note: those screenshot of yours are still using Markdown-like link syntax!

@mrossinek
Copy link
Member

Concealing on wrapped links is broken:

This is potentially tricky with how things are done currently in the concealer. I will need to take a look at Vhyrro's rewritten code though since there have been quite some changes. The problem will be that we need to iterate the char in the TS range one by one rather than just rely on the length of the node.

A followup question to this @max397574: is this soft-wrapped? If so, I don't think there is a way for us to handle this. Neovim itself would have to handle wrapping extmarks..

@danymat
Copy link
Member

danymat commented Jan 5, 2022

On another note: those screenshot of yours are still using Markdown-like link syntax!

Right, lmao

@max397574
Copy link
Contributor

Concealing on wrapped links is broken:

This is potentially tricky with how things are done currently in the concealer. I will need to take a look at Vhyrro's rewritten code though since there have been quite some changes. The problem will be that we need to iterate the char in the TS range one by one rather than just rely on the length of the node.

A followup question to this @max397574: is this soft-wrapped? If so, I don't think there is a way for us to handle this. Neovim itself would have to handle wrapping extmarks..

Not sure what soft-wrapped is
it's just a line longer than the screen is width

mrossinek added a commit to nvim-neorg/tree-sitter-norg that referenced this issue Jan 5, 2022
@mrossinek
Copy link
Member

The : on https:// is concealed:

Yes, I have encountered this too. The problem is that the : get's recognized as a link_modifier. I will try if I can fix the TS parser to disregard single link_modifier nodes (i.e. if they do not occur in pairs). That should fix this.

@danymat This should be fixed now. Can you please update your TS parser to verify?

@danymat
Copy link
Member

danymat commented Jan 5, 2022

@danymat This should be fixed now. Can you please update your TS parser to verify?

It is indeed ! thanks !

@mrossinek
Copy link
Member

Not sure what soft-wrapped is
it's just a line longer than the screen is width

See :help 'wrap'. If you use :set nowrap then a line which is longer than your window width will not get wrapped but instead extends to the right (you then need to scroll horizontally to see the rest).

@vhyrro
Copy link
Member Author

vhyrro commented Jan 5, 2022

Seems to be a problem with generic line breaks as well.

This is {a
test}[with custom text]

@mrossinek
Copy link
Member

Seems to be a problem with generic line breaks as well.

Yep. That's the original problem I discuss here: #292 (comment)

@karlc1
Copy link

karlc1 commented Jan 10, 2022

I just started trying neorg today, so I just assume that this is unintended behavior.
When I create a link, the link marker is still being rendered, but its foreground color is set to the normal bg color, so it looks like a bunch of whitespace before the custom text (but i can still yank the text or see it if highlighted in visual mode)

An inline link {| my marker}[with custom text].

looks like this in the editor

An inline link                        with custom text.

@max397574
Copy link
Contributor

I think I know what's the problem
could you send your neorg config and a screenshot?

@karlc1
Copy link

karlc1 commented Jan 10, 2022

I cannot take a screenshot at the moment, but it really looks just as described; like a bunch of whitespace of equal length as the marker.

Here is the config https://github.com/karlc1/nvim/blob/main/lua/plugins.lua#L691

@vhyrro
Copy link
Member Author

vhyrro commented Jan 23, 2022

Just a quick heads up that i've managed to fix some bugs related to the link concealing as discussed earlier above.

Those should now be highlighted properly :)

(also @karlc1 if you haven't already then updating Neorg should fix your problems you've described above) :)

@esquires
Copy link
Contributor

Thanks for the fixes! Here is one more. For the line

Here is {:inbox:}[my link]

with markup_preset set to brave I get the following:

brave

If I then enter insert mode on a line above the link by hitting o (not i and not on the link itself) it seems to get fixed:

brave_fixed

However, if I then enter insert mode on the link line it gets reset to the first markup.

@karlc1
Copy link

karlc1 commented Jan 27, 2022

@vhyrro I use neovim nightly and neorg on the latest tag, and i still don't think that the links look right.

This line
test: {:some_file:}[link!].

Looks like this:
test:       some_file       link!
(with the 'some_file word in faded color')

I would expect it to look like this:
test:   link!

@max397574
Copy link
Contributor

Check out the markup preset here: https://github.com/nvim-neorg/neorg/wiki/Concealer
This is expected

@karlc1
Copy link

karlc1 commented Jan 27, 2022

I see, did not realize this. The 'brave' preset works as I want it to, thanks for the clarification

@esquires
Copy link
Contributor

I see, did not realize this. The 'brave' preset works as I want it to, thanks for the clarification

Interesting it works on your end with the brave setting. Here is how the brave setting works for me for test: ⁠⁠⁠⁠⁠⁠⁠⁠⁠⁠{:some_file:}[link!].

brave_some_file

Can you post your config? Perhaps you have a setting that I don't that is making it work.

@max397574
Copy link
Contributor

this is because stuff breaks with the joiner char
that's why we introduced the other presets

@esquires
Copy link
Contributor

this is because stuff breaks with the joiner char
that's why we introduced the other presets

Thanks for the clarification. is it fixable or is brave not intended for use?

@karlc1
Copy link

karlc1 commented Jan 27, 2022

@esquires It does look like that for me if I enter insert mode on a line with a link, and then go back to normal mode but stay with the cursor on the same line. However, when I move the cursor to a different line it looks correct again.
I have a pretty basic config i believe https://github.com/karlc1/nvim/blob/main/lua/plugins.lua#L680

@top4ek
Copy link

top4ek commented Sep 19, 2023

Concealer hides URL properly, but affected by word warp — URL's hidden, but space for that still in place.

Screenshot_20230919_175602Screenshot_20230919_175608

@champignoom
Copy link
Contributor

Concealer hides URL properly, but affected by word warp — URL's hidden, but space for that still in place.

duplicate of #929

@akbng
Copy link

akbng commented Oct 14, 2023

HI!
Similar to @asmdv and @mike-lloyd03, I have issues only with the italics, superscripts & subscripts.
I have checked the terminal (using Kitty) and it works fine. Also, italics work fine with comments in other files.
image
I'm using custom icons for the headings!

Here's the terminal output for the following
image
Am not sure about the subscript and superscript part but the ITALICS should work.

@Drew-Daniels
Copy link

Drew-Daniels commented Oct 23, 2023

[SOLVED]: tmux does not support bold and italic fonts out of the box.

If you use tmux, you'll need to ensure that you have set -g default-terminal "tmux-256color" in your tmux.conf

[ISSUE]:
OS: OSX Ventura 13.6 (22G120)
Neovim: v0.9.2
Terminal: iTerm 2 3.4.21

I have similar issues to others where it doesn't appear that these markup formats work on my machine:

  • italic
  • strikethrough

image

image

This is after I set my terminal to use the font-meslo-lg-nerd-font font, installed via brew

Here is my neorg config:

require("neorg").setup({
  load = {
    ["core.defaults"] = {},
  }
})

image

terminal section from running :checkhealth

terminal ~
- key_backspace (kbs) terminfo entry: `key_backspace=^H`
- key_dc (kdch1) terminfo entry: `key_dc=\E[3~`
- $TERM_PROGRAM="iTerm.app"
- $COLORTERM="truecolor"

@bottd
Copy link
Contributor

bottd commented Dec 6, 2023

After upgrading from nvim 0.9 to nightly 0.10, I am seeing the closing bracket on links if they end with an emoji

On nvim 0.9

Screenshot 2023-12-06 at 7 23 29 AM

On nvim nightly

Screenshot 2023-12-06 at 7 21 45 AM

@rodhash
Copy link

rodhash commented Dec 6, 2023

I have a similar issue when opening toc:

Nvim: NVIM v0.10.0-dev-a84b454
Neorg: bf3daa22

image

@chasing-freedom
Copy link

chasing-freedom commented Dec 30, 2023

After upgrading from nvim 0.9 to nightly 0.10, I am seeing the closing bracket on links if they end with an emoji

On nvim 0.9
Screenshot 2023-12-06 at 7 23 29 AM

On nvim nightly
Screenshot 2023-12-06 at 7 21 45 AM

Same issue in CJK characters

On nvim 0.9.5
swappy-20231230_214244

On nvim v0.10.0-dev-1956+gec7453804
swappy-20231230_213541

Test link {https://github.com/}[文本]

SOLVED: After update to NVIM v0.10.0-dev-1991+gdd00b6b44

@birangsworld
Copy link

Hi there! new here so hopefully im posting to the right issue post
it seems ordered list doesnt render numbers beyond 20 and everything after that is just shown as ~
Screenshot 1402-10-12 at 12 14 21 in the afternoon

@max397574
Copy link
Contributor

@birangsworld that's actually the expected behavior because there aren't any characters to be used higher than that

there is an option in the concealer config which allows you to use complete numbers

@birangsworld
Copy link

@birangsworld that's actually the expected behavior because there aren't any characters to be used higher than that

there is an option in the concealer config which allows you to use complete numbers

Any chance you could help me out with setting the correct option in the [core.concealer] config?

@rodhash
Copy link

rodhash commented Jan 2, 2024

I have a similar issue when opening toc:

Nvim: NVIM v0.10.0-dev-a84b454 Neorg: bf3daa22

image

This is now fixed, TOC is awesome!

I couldn't find which specific commit did the trick but thanks to whomever did that

@sarawang9012
Copy link

sarawang9012 commented Jan 12, 2024

[SOLVED]: tmux does not support bold and italic fonts out of the box.

If you use tmux, you'll need to ensure that you have set -g default-terminal "tmux-256color" in your tmux.conf

Thank you. I was having issue of bold, italic and strikethrough in my tmux. After applying set -g default-terminal "tmux-256color" in tmux.conf, italic and strikethrough work perfectly. Only bold is not working. I checked its my terminal not supporting it. I am using wsl2 with ubuntu22.04, in case anyone having the same issue, you need to set "intenseTextStyle": "bold" to profiles.defaults item in windows terminal's settings.json file. For more information, refer to
109

@Drew-Daniels
Copy link

Drew-Daniels commented Jan 22, 2024

Posting this here, because I think it might help others. But in my case, I wasn't seeing italics or strikethroughs in iTerm2 (and while outside tmux), because in my .zshrc, I had explicitly had export TERM=screen-256colors.

I don't remember why I had set this at one point, but once I removed this, and configured iTerm2 to use xterm-256color everything worked as expected, and I was able to see italics and strikethrough in neovim correctly

image

image

@bwkam
Copy link

bwkam commented Feb 17, 2024

image
icon is sorta clipped

image
that's how the others look like

edit: that's only on kitty, they are fine on alactricitty

@shittened
Copy link

Bold, italic, underline not working for me. I saw some suggestion on how to fix above but none worked. Bold, italic, underline work outside of neorg. Im using kitty terminal on endeavour, everything up to date

@mateuscqueiros
Copy link

@Kiefciman same problem here

@champignoom
Copy link
Contributor

@Kiefciman @mateuscqueiros There was a breaking change related to highlighting. Try add tag = "v7.0.0" (see 0012776)

@shittened
Copy link

@champignoom this fixed it, thx

@carterprince
Copy link

carterprince commented Feb 24, 2024

@Kiefciman @mateuscqueiros There was a breaking change related to highlighting. Try add tag = "v7.0.0" (see 0012776)

This fixes underlines but not bold or italics for me.

I have determined it's not an issue with my terminal or fonts because in Neorg the "title" in document.meta still shows in bold.

@champignoom
Copy link
Contributor

champignoom commented Feb 28, 2024

@jonnypolite
Copy link

jonnypolite commented Feb 28, 2024

@Kiefciman @mateuscqueiros There was a breaking change related to highlighting. Try add tag = "v7.0.0" (see 0012776)

This doesn't seem to make any difference to me (I also can't get any text decoration to work inside neorg. bold, italic, strikethrough, etc). Is there something I should do after that change other than restart neovim?

Here's what I've already tried to resolve this issue:

  • :set conceallevel=2 (this just makes the ** or // go away but doesn't change the text)
  • :highlight mytest cterm=strikethrough gui=strikethrough followed by :highlight mytest (that works in the sense that I see strikethrough)
  • verified with echo commands at the command prompt that iterm2 can output the variants
  • Also ran :Neorg sync-parsers seemingly successfully

@albywalby
Copy link

On windows Terminal and some headings don't seem to render properly
image

@vhyrro vhyrro unpinned this issue Mar 24, 2024
@zvpyp
Copy link

zvpyp commented Mar 25, 2024

On fedora 39, first element of ordered lists is ignored in counting
image

@qZhang88
Copy link

qZhang88 commented Apr 9, 2024

concealer not working, and checkhealth show module not recognized

neorg ~
- Checking configuration...
- Checking `load` table...
- WARNING You are attempting to load a module core.concealer` which is not recognized by Neorg at this time. You may receive an error upon launching Neorg.
- OK Module declaration `core.dirman` is well-formed
- OK Module declaration `core.defaults` is well-formed
- WARNING You are attempting to load a module `core.ui.calendar` which is not recognized by Neorg at this time. You may receive an error upon launching Neorg.
- OK Default configuration for logger provided, Neorg will not output debug info.
- Checking existence of dependencies...
- OK Required dependency `vhyrro/luarocks` found!
- Checking existence of luarocks dependencies...
- OK Critical dependencies are installed. You are free to use Neorg!
- WARNING If you ever encounter errors please rerun `:Lazy build neorg` again :)

@sev1n75
Copy link

sev1n75 commented Jul 5, 2024

Hi, I wrote vim.o.conceallevel = 2 in my config file and the value of conceallevel is correctly set to be 2 in normal *.nrog file, however the conceallevel value of TOC window is still 0 as default.

Nvim: NVIM v0.10.0
Neorg: 99b32492b836b64a5ff454

截屏2024-07-05 20 30 48

@glyh
Copy link

glyh commented Jul 27, 2024

Latex rendering seems to be stop work for me from some point on:
I'm using lazy.nvim:

  {
    "vhyrro/luarocks.nvim",
    priority = 1001,
    opts = {
      rocks = { "magick" },
    },
    config = true,
  },
  {
    "3rd/image.nvim",
    dependencies = { "luarocks.nvim" },
    config = true,
  },

{
    "nvim-neorg/neorg",
    dependencies = { "luarocks.nvim" },
    lazy = false, -- Disable lazy loading as some `lazy.nvim` distributions set `lazy = true` by default
    -- version = "*", -- Pin Neorg to the latest stable release
    config = function()
      require("neorg").setup {
        load = {
          ["core.defaults"] = {},
          ["core.export"] = {},
          ["core.export.markdown"] = {},
          ["core.concealer"] = {},
          ["core.completion"] = {
            config = {
              engine = "nvim-cmp",
            },
          },
          ["core.dirman"] = {
            config = {
              workspaces = {
                knowledge = "~/Documents/Knowledge/Notes Base",
              },
              default_workspace = "knowledge",
            },
          },
          ["core.integrations.image"] = {},
          ["core.latex.renderer"] = {},
        },
      }
    end,
  }

Anyone have any ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Issue related to discussions, in preparation of a feature or bug fixes. module: existing modules Issue related to existing Modules
Projects
None yet
Development

No branches or pull requests