From 218683541f320935004e14ace5cda63c60c05521 Mon Sep 17 00:00:00 2001 From: Kyung Song Date: Thu, 1 May 2025 11:01:30 +0900 Subject: [PATCH] upstream changes --- init.lua | 3 ++- lua/custom/plugins/plugins.lua | 10 ++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/init.lua b/init.lua index 2a5c68b0..f7fb21d2 100644 --- a/init.lua +++ b/init.lua @@ -350,12 +350,13 @@ require('lazy').setup({ }, }, }, - -- NOTE: Plugins can specify dependencies. -- -- The dependencies are proper plugin specifications as well - anything -- you do for a plugin at the top level, you can do for a dependency. -- + -- + -- -- Use the `dependencies` key to specify the dependencies of a particular plugin { -- Fuzzy Finder (files, lsp, etc) diff --git a/lua/custom/plugins/plugins.lua b/lua/custom/plugins/plugins.lua index 44a89fa6..09108d5d 100644 --- a/lua/custom/plugins/plugins.lua +++ b/lua/custom/plugins/plugins.lua @@ -10,14 +10,12 @@ return { { 'nvim-tree/nvim-tree.lua', config = function() + local api = require 'nvim-tree.api' vim.g.loaded_netrw = 1 vim.g.loaded_netrwPlugin = 1 - vim.api.nvim_create_autocmd('BufReadPost', { - callback = function(data) - local api = require 'nvim-tree.api' - api.tree.open() - end, - }) + vim.keymap.set('n', 'st', function() + api.tree.toggle() + end, { desc = '[S]earch file tree [T]oggle' }) require('nvim-tree').setup { sort = { sorter = 'case_sensitive' }, view = { width = 30 },