Skip to content

Account for right panel like nvim-tree #23

Description

@dlvhdr

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions