Skip to content

how to use one instance in different tab #2718

Closed
@BingCoke

Description

@BingCoke

Description

I wanto use one nvim-tree in different tab page.
in page 1 i use NvimTree_1 but page 2 use NvimTree_2
截屏2024-03-19 18 32 46
截屏2024-03-19 18 33 09

Neovim version

NVIM v0.10.0-dev-2559+g3814750d3
Build type: RelWithDebInfo
LuaJIT 2.1.1707061634

Operating system and version

mac os 14.2 (23C64)

Windows variant

No response

nvim-tree version

f7c09bd

Clean room replication

require("nvim-tree").setup({
 view = {
    float = {
      enable = true,
      quit_on_focus_loss = true,
      open_win_config = function()
        local screen_w = vim.opt.columns:get()
        local screen_h = vim.opt.lines:get() - vim.opt.cmdheight:get()
        local window_w = screen_w * 0.6
        local window_h = screen_h * 0.6
        local window_w_int = math.floor(window_w)
        local window_h_int = math.floor(window_h)
        local center_x = (screen_w - window_w) / 2
        local center_y = ((vim.opt.lines:get() - window_h) / 2)
            - vim.opt.cmdheight:get()
        return {
          border = 'rounded',
          relative = 'editor',
          row = center_y,
          col = center_x,
          width = window_w_int,
          height = window_h_int,
        }
      end,
    },
    width = function()
      return math.floor(vim.opt.columns:get() * 0.6)
    end,
  },


})

Steps to reproduce

no

Expected behavior

No response

Actual behavior

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions