carbon-steel / detour.nvim

Use popup windows to navigate files/buffer and to contain shells/TUIs
MIT License
153 stars 4 forks source link

Add option 'allow_nested = false/true' #9

Closed jonahfang closed 10 months ago

jonahfang commented 11 months ago

I prefer one layer of popup window, I do like this now:


        { "zp", mode = {"n"}, function()
            if w.is_floating() then
                return
            end -- no nested popup
            if not w.is_file() then
                return
            end
            require("detour").Detour()
        end},
carbon-steel commented 10 months ago

Thanks for bringing this up. Currently, I prefer not to implement an option into the plugin to alter its behavior when it is possible for users to accomplish the desired behavior (eg, preventing nesting) in a small amount of code in their config. My vision for the plugin is to provide a minimal interface that can be used flexibly. Your example code is the kind of configuration that I intend for users to create for themselves.

That being said, creating a place where users can share these sample codes is on my todo list.