From a59a9b384beb3b6a97d21708b42385c8f018654e Mon Sep 17 00:00:00 2001 From: c-my Date: Mon, 13 Feb 2023 13:54:20 +0800 Subject: [PATCH] fix: disable open nvimtree on startup --- lazy-lock.json | 4 ++-- lua/plugins/nvimtree.lua | 21 ++++++++++----------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index d0aa3eb..8a150ed 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -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" }, diff --git a/lua/plugins/nvimtree.lua b/lua/plugins/nvimtree.lua index 2d361fd..b3f8dc9 100644 --- a/lua/plugins/nvimtree.lua +++ b/lua/plugins/nvimtree.lua @@ -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 = { { '', 'NvimTreeFindFileToggle ', desc = "Nvimtree Toggle" @@ -29,16 +29,15 @@ return { 'a', 'NvimTreeFocus ', 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 }