fix: disable open nvimtree on startup

This commit is contained in:
2023-02-13 13:54:36 +08:00
parent f556574da0
commit a59a9b384b
2 changed files with 12 additions and 13 deletions
+2 -2
View File
@@ -17,8 +17,8 @@
"nvim-autopairs": { "branch": "master", "commit": "45ae3122a4c7744db41298b41f9f5a3f092123e6" },
"nvim-cmp": { "branch": "main", "commit": "aae0c3e4e778ca4be6fabc52e388cbd5b844b7a5" },
"nvim-lspconfig": { "branch": "master", "commit": "1712672e4da3003a0dd9f771d30389600b360f42" },
"nvim-tree.lua": { "branch": "master", "commit": "36e29c3a95ae606449f6616a0d8ab7247af807dc" },
"nvim-treesitter": { "branch": "master", "commit": "2c2430d42f30d1aef8715aed933272c9a6898f4e" },
"nvim-tree.lua": { "branch": "master", "commit": "8b8d457e07d279976a9baac6bbff5aa036afdc5f" },
"nvim-treesitter": { "branch": "master", "commit": "7eb5f1a2e3949496f26c4084b521b30f2d08137a" },
"nvim-web-devicons": { "branch": "master", "commit": "bd7a222287c5828cd0607cd0a5605e52f0460074" },
"plenary.nvim": { "branch": "master", "commit": "9a0d3bf7b832818c042aaf30f692b081ddd58bd9" },
"symbols-outline.nvim": { "branch": "master", "commit": "512791925d57a61c545bc303356e8a8f7869763c" },
+10 -11
View File
@@ -1,6 +1,6 @@
return {
"nvim-tree/nvim-tree.lua",
dependencies = {"nvim-tree/nvim-web-devicons" -- optional, for file icon
dependencies = { "nvim-tree/nvim-web-devicons" -- optional, for file icon
},
lazy = false,
opts = {
@@ -21,7 +21,7 @@ return {
group_empty = true
}
},
keys = {{
keys = { {
'<C-n>',
'<Cmd>NvimTreeFindFileToggle <CR>',
desc = "Nvimtree Toggle"
@@ -29,16 +29,15 @@ return {
'<Leader>a',
'<Cmd>NvimTreeFocus <CR>',
desc = "Nvimtree Focus"
}},
} },
config = function()
require("nvim-tree").setup(opts)
local function open_nvim_tree()
-- open the tree
require("nvim-tree.api").tree.open()
end
vim.api.nvim_create_autocmd({"VimEnter"}, {
callback = open_nvim_tree
})
-- local function open_nvim_tree()
-- -- open the tree
-- require("nvim-tree.api").tree.open()
-- end
-- vim.api.nvim_create_autocmd({"VimEnter"}, {
-- callback = open_nvim_tree
-- })
end
}