From 63e3cfdcd59c460c8143447aa15aab83ec316c16 Mon Sep 17 00:00:00 2001 From: Marco Date: Sun, 15 Oct 2023 18:08:43 +0200 Subject: [PATCH] Add remaps for project tree --- after/plugin/nvim-tree.lua | 7 ++++++- lua/myworkflow/remap.lua | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/after/plugin/nvim-tree.lua b/after/plugin/nvim-tree.lua index 35d60c5..2e6e71b 100644 --- a/after/plugin/nvim-tree.lua +++ b/after/plugin/nvim-tree.lua @@ -1,3 +1,6 @@ +local tree = require("nvim-tree") +tree.setup() + -- disable netrw at the very start of your init.lua vim.g.loaded_netrw = 1 vim.g.loaded_netrwPlugin = 1 @@ -5,5 +8,7 @@ vim.g.loaded_netrwPlugin = 1 -- set termguicolors to enable highlight groups vim.opt.termguicolors = true +vim.keymap.set("n", "fj", vim.cmd.NvimTreeFindFile) +vim.keymap.set("n", "ft", vim.cmd.NvimTreeFindFileToggle) + -- empty setup using defaults -require("nvim-tree").setup() diff --git a/lua/myworkflow/remap.lua b/lua/myworkflow/remap.lua index d53e9d9..fe46fe9 100644 --- a/lua/myworkflow/remap.lua +++ b/lua/myworkflow/remap.lua @@ -1,5 +1,5 @@ vim.g.mapleader = " " -vim.keymap.set("n", "pv", vim.cmd.Ex) +vim.keymap.set("n", "pv", vim.cmd.NvimTreeToggle) vim.keymap.set("v", "J", ":m '>+1gv=gv") vim.keymap.set("v", "K", ":m '<-2gv=gv")