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

feature: Expose a setting to modify nui's autoclosing #519

Closed
1 task done
MariaSolOs opened this issue Jun 24, 2023 · 6 comments
Closed
1 task done

feature: Expose a setting to modify nui's autoclosing #519

MariaSolOs opened this issue Jun 24, 2023 · 6 comments
Labels
enhancement New feature or request

Comments

@MariaSolOs
Copy link
Contributor

Did you check the docs?

  • I have read all the noice.nvim docs

Is your feature request related to a problem? Please describe.

Sometimes I don't want views to be automatically closed (e.g. when I run :hi and I'm taking my time going through all highlights).

Describe the solution you'd like

Having a setting (with its use documented) that allows me to configure the autoclosing of splits created with nui.

Describe alternatives you've considered

I searched everywhere in this repo and in nui trying to find a way to achieve this, but it seems like this logic depends on private settings that I don't fully understand.

Additional context

No response

@MariaSolOs MariaSolOs added the enhancement New feature or request label Jun 24, 2023
@folke
Copy link
Owner

folke commented Jun 24, 2023

That code you link to is not really being used.

What views are the ones you want to keep longer?

You can always do :Noice last to show the last message in a floating window as well

@MariaSolOs
Copy link
Contributor Author

@folke :hi is an example. I believe the highlight results currently go to a nui split which disappears quite quickly, which doesn’t give me enough time to read through.

@folke
Copy link
Owner

folke commented Jun 24, 2023

Only the mini view should autohide. If it's not the mini view, can you post a screenshot of what you mean?

Noice splits don't autohide by default, unless you added a timeout to the view config.

For long messages like :hi, you can also enable the long_message_to_split preset.
Make sure to update Noice first, since I just fixed an issue with preset routes.

@MariaSolOs
Copy link
Contributor Author

With this noice config, I'm having this behaviour:

Screen.Recording.2023-06-24.at.12.28.58.PM.mov

Is it because I set messages = { view = 'mini' }? I guess that I expected the long_message_to_split to override that.

@MariaSolOs
Copy link
Contributor Author

@folke nvm! I just bumped noice and when going over the release notes it seems like this was caused by #517. Closing as fixed 😸

@folke
Copy link
Owner

folke commented Jun 24, 2023

Ah yes, right. Glad it's working now :)

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