Change back to floating and remove auto-open
This commit is contained in:
parent
3ee946324a
commit
0eaf1dd436
|
@ -27,6 +27,9 @@ require("nvim-tree").setup({
|
|||
show_on_open_dirs = false,
|
||||
},
|
||||
view = {
|
||||
float = {
|
||||
enable = true,
|
||||
},
|
||||
centralize_selection = true,
|
||||
},
|
||||
renderer = {
|
||||
|
@ -49,17 +52,3 @@ require("nvim-tree").setup({
|
|||
dotfiles = true,
|
||||
},
|
||||
})
|
||||
|
||||
local function open_nvim_tree(data)
|
||||
-- buffer is a [No Name]
|
||||
local no_name = data.file == "" and vim.bo[data.buf].buftype == ""
|
||||
|
||||
if not no_name then
|
||||
return
|
||||
end
|
||||
|
||||
-- open the tree, find the file but don't focus it
|
||||
require("nvim-tree.api").tree.toggle({ focus = false })
|
||||
end
|
||||
|
||||
vim.api.nvim_create_autocmd({ "VimEnter" }, { callback = open_nvim_tree })
|
||||
|
|
Loading…
Reference in a new issue