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: When help window is open, do not completely close neotree when q is pressed #1349

Open
1 task done
rafamadriz opened this issue Feb 10, 2024 · 2 comments
Open
1 task done
Labels
enhancement New feature or request gauging-interest This will happen if enough people express interest in this feature.

Comments

@rafamadriz
Copy link

Did you check the docs?

  • I have read all the docs.

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

It is something really small but I found it extremely annoying, whenever I open the help window (?) to check something quick, I press q out of muscle memory to close that floating window, but it completely closes neotree and I have to open it again to continue with what I was doing.

q Is kinda like the standard key to close floating ui's (most other plugins and neotree itself use it for that purpose), but in this case I believe it makes sense to only close the help window when it is open and, not the entire neotree window.

I did look into the code to do a PR myself but got the impression that is not as simple as I initially thought (or maybe it is simple and I'm just stupid). Anyway if you think this makes sense and I get some indications, I'll be happy to do it.

Describe the solution you'd like.

Do not close the entire neotree window when q is pressed and the help window is open

Describe alternatives you've considered.

No response

Additional Context

No response

@rafamadriz rafamadriz added the enhancement New feature or request label Feb 10, 2024
@pysan3
Copy link
Collaborator

pysan3 commented Feb 11, 2024

Na, it's hardcoded to close with <ESC> so no luck...

popup:map("n", "<esc>", function()
popup:unmount()
end, { noremap = true })

However, you can disable q from doing anything when help menu is on.
With this setting, you'll have to press <ESC> (to exit help) and then q to close neo-tree, which might be a better experience.

config = {
  window = {
    mappings = {
      ["?"] = { "show_help", config = { prefix_key = "q" } },
    },
  },
}

@pysan3 pysan3 added the gauging-interest This will happen if enough people express interest in this feature. label Mar 12, 2024
@pysan3
Copy link
Collaborator

pysan3 commented Mar 12, 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 gauging-interest This will happen if enough people express interest in this feature.
Projects
None yet
Development

No branches or pull requests

2 participants