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

Automatically re-enable auto-unfolding even after manual fold toggling #93

Open
Giessen opened this issue Sep 20, 2024 · 3 comments
Open
Labels
enhancement New feature or request

Comments

@Giessen
Copy link

Giessen commented Sep 20, 2024

Description

After run fold_toggle on current node, the default behaviour of auto_unfold -ing others stops working.

Steps to reproduce:
1.Open outline window
2.Click to focus on one node with children underneath.
We watched the node unfolding. OK.
3.Click to focus on second node with children underneath.
We watched the second node unfolding, and previous node collapsing. OK.
4.Run fold_toggle (I set with Tab key in keymaps={...fold_toggle = {''}...}).
Run again.
We watched the second node collapsing and unfolding again.
5.Swtich focus back to the first node (in step 2).
Expected: the second node would collapse.
Reality: nothing happends with the second node (keep unfolded).

Neovim setup

  • Neovim version: v0.11.0-dev-3c803483a
  • Outline.nvim version: v1.0.0
  • Neovim distro (if applicable): LazyVim
  • Plugin manager: Lazy.nvim

Config:

keymaps = {
fold_toggle = {'<Tab>'},
},
symbol_folding = {
  auto_unfold = {
    hovered = true,
    only = 0, 
  },
},
@Giessen Giessen added the bug Something isn't working label Sep 20, 2024
@hedyhli
Copy link
Owner

hedyhli commented Sep 20, 2024

Hi, manual folds (as the result of the folding key maps) are saved and they will not be affected by the auto-folding behaviour. They can be reset using the R key by default. Could you give it a try and see if that fixes auto-folding?

@Giessen
Copy link
Author

Giessen commented Sep 21, 2024

I can confirm the R key resets the auto-folding.

Is there an option to keep the auto-folding behaviour after running fold_toggle (also fold_toggle_all), without pressing R key? IMHO, I find no reason to affect the auto-folding (:.

Thank you very much.

@hedyhli
Copy link
Owner

hedyhli commented Sep 21, 2024

Hmm I see, I'll make this a feature request for now then.

@hedyhli hedyhli added enhancement New feature or request and removed bug Something isn't working labels Sep 21, 2024
@hedyhli hedyhli changed the title Manual run fold_toggle fails auto_unfold of node Automatically re-enable auto-unfolding even after manual fold toggling Sep 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants