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

Account for right panel like nvim-tree #23

Open
dlvhdr opened this issue Oct 15, 2022 · 1 comment
Open

Account for right panel like nvim-tree #23

dlvhdr opened this issue Oct 15, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@dlvhdr
Copy link

dlvhdr commented Oct 15, 2022

I use nvim-tree on the right side, and what happens is that notifier will overlap with it, when it display notifications.
Is it possible to configure the offset from the right edge of the screen?

  • In lualine I'm doing this to account for the file tree:
local nvim_tree_shift = {
  function()
    local empty_space = string.rep(" ", vim.api.nvim_win_get_width(tree_view.get_winnr())
    return empty_space
  end,
  cond = require("nvim-tree").view.is_visible,
}
  • In bufferline (which I don't use) they do it this way:
>
    offsets = {
        {
            filetype = "NvimTree",
            text = "File Explorer",
            highlight = "Directory"
            separator = true -- use a "true" to enable the default, or set your own character
        }
    }
<

The `filetype` is used to check whether a particular window is a match, the
`text` is *optional* and will show above the window if specified.

I like this approach.

WDYT?

@vigoux
Copy link
Owner

vigoux commented Oct 16, 2022

Hi, this indeed seems to be a concern.

As of now, the position of the UI is computed relative to the editor window (see here).

I see two paths to be taken:

  • either allow an offset (maybe static first) as a configuration option, to allow for this kind of behavior
  • allow to chose how we display the UI: relative to the editor or the current window.

The general idea though is a 100% valid, and I'll classify that as a bug.

@vigoux vigoux added the bug Something isn't working label Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants