add mapping to focus nvimtree (349)

This commit is contained in:
siduck76 2021-08-23 16:44:52 +05:30
parent b2ec48ef30
commit ac83f1d580
3 changed files with 6 additions and 3 deletions

View File

@ -158,6 +158,7 @@ end
M.nvimtree = function() M.nvimtree = function()
map("n", plugin_maps.nvimtree.toggle, ":NvimTreeToggle <CR>", opt) map("n", plugin_maps.nvimtree.toggle, ":NvimTreeToggle <CR>", opt)
map("n", plugin_maps.nvimtree.focus, ":NvimTreeFocus <CR>", opt)
end end
M.neoformat = function() M.neoformat = function()

View File

@ -157,14 +157,16 @@ M.mappings.plugin = {
new_file = "<leader>fn", -- basically create a new buffer new_file = "<leader>fn", -- basically create a new buffer
open = "<leader>db", -- open dashboard open = "<leader>db", -- open dashboard
session_load = "<leader>l", -- load a saved session session_load = "<leader>l", -- load a saved session
session_save = "<leader>s", -- save a session session_save = "<leader>s",
}, },
-- note: this is an edditional mapping to escape, escape key will still work -- note: this is an edditional mapping to escape, escape key will still work
better_escape = { better_escape = {
esc_insertmode = { "jk" }, -- multiple mappings allowed esc_insertmode = { "jk" }, -- multiple mappings allowed
}, },
nvimtree = { nvimtree = {
toggle = "<C-n>", -- file manager -- file tree
toggle = "<C-n>",
focus = "<C-h>",
}, },
neoformat = { neoformat = {
format = "<leader>fm", format = "<leader>fm",

View File

@ -247,7 +247,7 @@ return packer.startup(function()
-- file managing , picker etc -- file managing , picker etc
use { use {
"kyazdani42/nvim-tree.lua", "kyazdani42/nvim-tree.lua",
cmd = "NvimTreeToggle", cmd = {"NvimTreeToggle", "NvimTreeFocus"},
config = function() config = function()
require "plugins.configs.nvimtree" require "plugins.configs.nvimtree"
end, end,