Advertisement
Guest User

Nvim-tree floating window

a guest
Sep 16th, 2022
1,476
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.49 KB | Source Code | 0 0
  1. local nvim_tree = require('nvim-tree')
  2. local gwidth = vim.api.nvim_list_uis()[1].width
  3. local gheight = vim.api.nvim_list_uis()[1].height
  4. local width = 60
  5. local height = 20
  6.  
  7. nvim_tree.setup{
  8.   view = {
  9.     width = width,
  10.     height = height,
  11.     float = {
  12.       enable = true,
  13.       open_win_config = {
  14.         relative = "editor",
  15.         width = width,
  16.         height = height,
  17.         row = (gheight - height) * 0.4,
  18.         col = (gwidth - width) * 0.5,
  19.       }
  20.     }
  21.   }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement