You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes, given my cursor being on the name or the contents of any header, including lower level headers like level 3 headers...
When I press za/zc to fold the header, EVERYTHING below it is folded, including higher hierarchy headers such as level 1 and 2 headers.
It happens even if I add --- or === to mark the end of a header's contents.
EXAMPLE:
Folding a level 3 header results in EVERYTHING below getting folded, including the level 2 header which should remain unfolded because it has a higher hierarchy.
Before After
Expected behavior
Given my cursor being inside of a fold, or on a header that can be folded...
When I press za / zc it should only fold itself and its contents (including any lower level headers).
It should never fold any higher level headers below it.
Strangely, if I ggVG + dp to copy and paste the entire file on top of itself, or on a new .norg file, folds work as expected insofar I don't add or modify any new content, header text or header hierarchy. The screenshots below, with the expected behavior, were taken after using this workaround.
EXAMPLE OF EXPECTED BEHAVIOR Before After
Steps to reproduce
To reproduce the bug:
Open a norg file
Modify the name of a header, or its contents, or add subheaders (like adding a level 3 header inside a level 2 one).
Press za or zc with the cursor on the header's name, or within its contents.
The entire file below will fold.
To reproduce the behavior expected at all times:
Either open a .norg file with folds and do not modify its contents.
OR
Once a .norg file with folds has the folding issue described above, copy the entire file via deleting or yanking.
Delete the contents of the entire file
Paste what you just copied, either on the same file or a different one.
Toggle some folds. They will work as expected and fold only its contents, not the entire file below them.
Potentially conflicting plugins
I don't think I use any plugins that directly affect folding behavior. I haven't changed my Neovim plugins recently, except for my colorscheme (now using Catppuccin Macchiato).
Other information
I'm running Fedora 39, and I'm using nvim 0.9.5. I installed Neorg via Lazy and use vhyrro's luarocks.nvim.
I have tried toggling the concealer off but it doesn't fix the issue, only re-pasting the entire file does.
As requested in CONTRIBUTING.md, here is a copy of my neorg.log. I no longer have the Otter plugin installed.
[ERROR Sat 06 Apr 2024 11:53:46 PM CST] ...im/lazy/neorg/lua/neorg/modules/core/neorgcmd/module.lua:240: Error when executing `:Neorg otter` - such a command does not exist!
[ERROR Sat 06 Apr 2024 11:53:58 PM CST] ...im/lazy/neorg/lua/neorg/modules/core/neorgcmd/module.lua:240: Error when executing `:Neorg otter` - such a command does not exist!
[ERROR Sun 07 Apr 2024 12:03:50 AM CST] ...im/lazy/neorg/lua/neorg/modules/core/neorgcmd/module.lua:240: Error when executing `:Neorg otter` - such a command does not exist!
While I cannot really submit a PR with a code fix, I'm happy to help with testing and provide any additional information that might help. Thanks for your time and help!
The text was updated successfully, but these errors were encountered:
noctopixi
added
the
bug
Issues related to bugs. Please attach a severity, a priority and category with this label.
label
Apr 19, 2024
I'm unable to reproduce the issue following your instructions (on 9.5 or nightly).
Folding is known to be buggy, most often :e (just re-opening the file) fixes it. Also tested with/without ufo, and it still doesn't reproduce the issue.
It happens quite frequently but not on every level 3 header, seems like it can't be the last level 3 header and also not the first. :e does fix it.
I have ufo installed but turned off in norg files.
Hi! I haven't noticed it in level 3 headers only, but on the entire file. I am still unsure as to what causes it to occur.
I need to use Neorg today, if/when the problem comes up, I will try recording a video.
Prerequisites
Neovim Version
0.9.5
Neorg setup
I use Lazy and source the config from nvim-neorg.lua.
Lazy reports that Neorg is at version 8.4.1
Actual behavior
Sometimes, given my cursor being on the name or the contents of any header, including lower level headers like level 3 headers...
When I press
za/zc
to fold the header, EVERYTHING below it is folded, including higher hierarchy headers such as level 1 and 2 headers.It happens even if I add
---
or===
to mark the end of a header's contents.EXAMPLE:
Folding a level 3 header results in EVERYTHING below getting folded, including the level 2 header which should remain unfolded because it has a higher hierarchy.
Before
After
Expected behavior
Given my cursor being inside of a fold, or on a header that can be folded...
When I press
za / zc
it should only fold itself and its contents (including any lower level headers).It should never fold any higher level headers below it.
Strangely, if I
ggVG
+dp
to copy and paste the entire file on top of itself, or on a new .norg file, folds work as expected insofar I don't add or modify any new content, header text or header hierarchy. The screenshots below, with the expected behavior, were taken after using this workaround.EXAMPLE OF EXPECTED BEHAVIOR
Before
After
Steps to reproduce
To reproduce the bug:
za
orzc
with the cursor on the header's name, or within its contents.To reproduce the behavior expected at all times:
OR
Potentially conflicting plugins
I don't think I use any plugins that directly affect folding behavior. I haven't changed my Neovim plugins recently, except for my colorscheme (now using Catppuccin Macchiato).
Other information
I'm running Fedora 39, and I'm using nvim 0.9.5. I installed Neorg via Lazy and use vhyrro's luarocks.nvim.
I have tried toggling the concealer off but it doesn't fix the issue, only re-pasting the entire file does.
As requested in CONTRIBUTING.md, here is a copy of my
neorg.log
. I no longer have the Otter plugin installed.My neorg is pinned to the latest release.
Modules list
Help
No
Implementation help
While I cannot really submit a PR with a code fix, I'm happy to help with testing and provide any additional information that might help. Thanks for your time and help!
The text was updated successfully, but these errors were encountered: