diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 9722b4e..358c843 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -158,6 +158,7 @@ end M.nvimtree = function() map("n", plugin_maps.nvimtree.toggle, ":NvimTreeToggle ", opt) + map("n", plugin_maps.nvimtree.focus, ":NvimTreeFocus ", opt) end M.neoformat = function() diff --git a/lua/default_config.lua b/lua/default_config.lua index 1f5df32..afa0370 100644 --- a/lua/default_config.lua +++ b/lua/default_config.lua @@ -157,14 +157,16 @@ M.mappings.plugin = { new_file = "fn", -- basically create a new buffer open = "db", -- open dashboard session_load = "l", -- load a saved session - session_save = "s", -- save a session + session_save = "s", }, -- note: this is an edditional mapping to escape, escape key will still work better_escape = { esc_insertmode = { "jk" }, -- multiple mappings allowed }, nvimtree = { - toggle = "", -- file manager + -- file tree + toggle = "", + focus = "", }, neoformat = { format = "fm", diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index e652089..3ecf339 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -247,7 +247,7 @@ return packer.startup(function() -- file managing , picker etc use { "kyazdani42/nvim-tree.lua", - cmd = "NvimTreeToggle", + cmd = {"NvimTreeToggle", "NvimTreeFocus"}, config = function() require "plugins.configs.nvimtree" end,