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: Hide and Show Edgy Windows While Preserving Content #60

Open
1 task done
tummetott opened this issue Nov 14, 2023 · 0 comments
Open
1 task done

feature: Hide and Show Edgy Windows While Preserving Content #60

tummetott opened this issue Nov 14, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@tummetott
Copy link

Did you check the docs?

  • I have read all the edgy.nvim docs

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

I've configured edgy.nvim to display help, trouble, manpage, and quickfix windows. Due to limited screen space, there are times when I'd like to temporarily hide the edgy window to focus on my codebase, only to return to, for example, the help menu later. Unfortunately, the current functionality doesn't allow hiding the edgy window without closing its content. While the require("edgy").toggle(pos?) API function exists, it only toggles pinned views, and there's no direct way to restore a specific help or manual buffer that was being read.

Additionally, there is the "hide" keymap, yet its functionality differs from the desired behavior. While it effectively collapses within the edgbar, it doesn't contribute to expanding available screen space. Instead, it simply makes more room for other edgy configured windows within the existing display layout.

I appreciate edgy's unified concept, especially the ability to close every configured window with q. It would be beneficial if there were a command to toggle every edgy window without losing its content, providing a seamless way to manage visibility without disrupting the current state of individual buffers.

Describe the solution you'd like

I propose the inclusion of two new functions in the edgy.nvim API:

-- This function would be designed to hide the edgbar at a specified 
-- position without removing its content.
require("edgy").hide(pos?)

-- This function would facilitate the display of the hidden edgbar at 
-- the specified position, restoring its visibility.
require("edgy").show(pos?)

Furthermore, for consistency in naming conventions, the existing keymap:

["<c-q>"] = function(win) win:hide() end

-- could be more aptly renamed to:

["<c-q>"] = function(win) win:collapse() end

This adjustment aims to provide a clearer and more cohesive naming structure for keymap actions within the edgy.nvim configuration.

Describe alternatives you've considered

I've explored the idea of creating a custom keymap to minimize the edgy window:

["<c-w>_"] = function(win)
    win:resize("height", [min value])
end,

However, the result doesn't look very nice to me.

Additional context

No response

@tummetott tummetott added the enhancement New feature or request label Nov 14, 2023
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

1 participant