From 482b3c2632a8dd1f6fe091e198e60041a8d874e5 Mon Sep 17 00:00:00 2001 From: Edward Litherland-Smith Date: Fri, 23 Sep 2022 17:48:12 +0100 Subject: [PATCH] Add nvim-tree and hop, with key binds. Disable netrw (for nvim-tree) --- init.lua | 12 ++++++++++++ init.vim | 7 +++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index e698efb3..555951e3 100644 --- a/init.lua +++ b/init.lua @@ -1,3 +1,7 @@ +-- Disable netrw +vim.g.loaded = 1 +vim.g.loaded_netrwPlugin = 1 + -- lualine config require('lualine').setup{ options = { @@ -11,6 +15,14 @@ require('lualine').setup{ extensions = {'aerial', 'fugitive', 'fzf', 'nerdtree', 'toggleterm'} } +-- nvim-tree setup +require('nvim-tree').setup{ + filters = { custom = { "^.git$" } } +} + +-- hop setup +require('hop').setup() + -- toggleterm config require('toggleterm').setup{ open_mapping = [[\t]], diff --git a/init.vim b/init.vim index bf9a71da..bc83a858 100644 --- a/init.vim +++ b/init.vim @@ -25,6 +25,7 @@ Plug 'tpope/vim-commentary' Plug 'airblade/vim-gitgutter' Plug 'nvim-lualine/lualine.nvim' Plug 'kyazdani42/nvim-web-devicons' +Plug 'kyazdani42/nvim-tree.lua' Plug 'christoomey/vim-tmux-navigator' Plug 'akinsho/toggleterm.nvim', {'tag' : 'v2.*'} Plug 'hrsh7th/cmp-nvim-lsp' @@ -38,6 +39,7 @@ Plug 'nvim-telescope/telescope.nvim', { 'tag': '0.1.0' } Plug 'nvim-telescope/telescope-fzf-native.nvim', { 'do': 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build' } Plug 'rcarriga/nvim-notify' Plug 'michaelb/sniprun', {'do': 'bash install.sh'} +Plug 'phaazon/hop.nvim' " Initialize plugin system call plug#end() @@ -104,8 +106,9 @@ nnoremap fe Telescope diagnostics nnoremap fn Telescope notify nnoremap ft Telescope treesitter nnoremap fz Telescope current_buffer_fuzzy_find +nnoremap hl HopLine +nnoremap hw HopWord +nnoremap nt NvimTreeToggle set splitbelow set splitright - -let g:netrw_list_hide= '\(^\|\s\s\)\zs\.\S\+'