From a5883567bb5d32257dfb1f7b244eb143241633cc Mon Sep 17 00:00:00 2001 From: Matei Adriel Date: Mon, 7 Feb 2022 13:39:08 +0200 Subject: [PATCH] feat: added nerdtree and stuff --- dotfiles/neovim/lua/my/plugins/init.lua | 1 + dotfiles/neovim/lua/my/plugins/nerdtree.lua | 10 ++++++++++ modules/applications/neovim.nix | 7 ++++++- 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 dotfiles/neovim/lua/my/plugins/nerdtree.lua diff --git a/dotfiles/neovim/lua/my/plugins/init.lua b/dotfiles/neovim/lua/my/plugins/init.lua index 7f6ead5..8fe3d0c 100644 --- a/dotfiles/neovim/lua/my/plugins/init.lua +++ b/dotfiles/neovim/lua/my/plugins/init.lua @@ -6,6 +6,7 @@ function M.setup() require("my.plugins.telescope").setup() require("my.plugins.treesitter").setup() require("my.plugins.comment").setup() + require("my.plugins.nerdtree").setup() -- Other unconfigured plugins require('nvim-autopairs').setup() diff --git a/dotfiles/neovim/lua/my/plugins/nerdtree.lua b/dotfiles/neovim/lua/my/plugins/nerdtree.lua new file mode 100644 index 0000000..5bcd3f2 --- /dev/null +++ b/dotfiles/neovim/lua/my/plugins/nerdtree.lua @@ -0,0 +1,10 @@ +local mapSilent = require("my.keymaps").mapSilent + +local M = {} + +function M.setup() + -- Toggle nerdtree with Control-t + mapSilent("n", "", ":NERDTreeToggle") +end + +return M diff --git a/modules/applications/neovim.nix b/modules/applications/neovim.nix index b3438c8..6c80d12 100644 --- a/modules/applications/neovim.nix +++ b/modules/applications/neovim.nix @@ -5,7 +5,8 @@ let name = "config-nvim"; src = ../../dotfiles/neovim; }; -in { +in +{ home-manager.users.adrielus.programs.neovim = { enable = true; package = pkgs.neovim-nightly; @@ -44,7 +45,11 @@ in { nvim-treesitter # use treesitter for syntax highlighting startup-nvim # splash screen vim-devicons # nice looking icons + nvim-web-devicons # fork of vim-devicons? plenary-nvim # async utility lib it seems? + nerdtree # file tree + nerdtree-git-plugin # show git status for files + nerdtree-syntax-highlight # syntax hightlight files in the tree ]; }; }