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

how to use one instance in different tab #2718

Closed
BingCoke opened this issue Mar 19, 2024 · 2 comments
Closed

how to use one instance in different tab #2718

BingCoke opened this issue Mar 19, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@BingCoke
Copy link

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

@BingCoke BingCoke added the bug Something isn't working label Mar 19, 2024
@gegoune
Copy link
Collaborator

gegoune commented Mar 19, 2024

DupIicate #2255

@BingCoke
Copy link
Author

DupIicate #2255

OK thanks!~

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