From 9325bcd34d39d32ce8b045671ff3b28ca67d3cf1 Mon Sep 17 00:00:00 2001 From: Daniel Lynn Date: Wed, 18 Aug 2021 11:20:48 -0500 Subject: [PATCH] Switch to nvim-tree --- nvim/nerdtree.vimrc | 7 ------- nvim/nvimtree.vimrc | 31 +++++++++++++++++++++++++++++++ nvim/plugins.vimrc | 9 ++++----- vimrc | 4 ++-- 4 files changed, 37 insertions(+), 14 deletions(-) delete mode 100644 nvim/nerdtree.vimrc create mode 100644 nvim/nvimtree.vimrc diff --git a/nvim/nerdtree.vimrc b/nvim/nerdtree.vimrc deleted file mode 100644 index de9d499..0000000 --- a/nvim/nerdtree.vimrc +++ /dev/null @@ -1,7 +0,0 @@ -augroup CustomNERDTree - autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists("s:std_in") | exe 'NERDTree' argv()[0] | wincmd p | ene | endif - autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif - autocmd Filetype nerdtree,tagbar setlocal signcolumn=no nocursorline norelativenumber -augroup END - -noremap d :NERDTreeToggle diff --git a/nvim/nvimtree.vimrc b/nvim/nvimtree.vimrc new file mode 100644 index 0000000..4454e50 --- /dev/null +++ b/nvim/nvimtree.vimrc @@ -0,0 +1,31 @@ +let g:nvim_tree_icons = { + \ 'default': '', + \ 'symlink': '', + \ 'git': { + \ 'unstaged': "✗", + \ 'staged': "✓", + \ 'unmerged': "", + \ 'renamed': "➜", + \ 'untracked': "★", + \ 'deleted': "", + \ 'ignored': "◌" + \ }, + \ 'folder': { + \ 'arrow_open': "🗹", + \ 'arrow_closed': "☐", + \ 'default': "", + \ 'open': "", + \ 'empty': "", + \ 'empty_open': "", + \ 'symlink': "", + \ 'symlink_open': "", + \ }, + \ 'lsp': { + \ 'hint': "", + \ 'info': "", + \ 'warning': "", + \ 'error': "", + \ } + \ } + +noremap :NvimTreeToggle diff --git a/nvim/plugins.vimrc b/nvim/plugins.vimrc index 744954a..8b00bdc 100644 --- a/nvim/plugins.vimrc +++ b/nvim/plugins.vimrc @@ -23,15 +23,14 @@ Plug 'itchyny/lightline.vim' | \ Plug 'albertomontesg/lightline-asyncrun' | \ Plug 'itchyny/vim-gitbranch' | \ Plug 'macthecadillac/lightline-gitdiff' | + \ Plug 'ryanoasis/vim-devicons' | \ Plug 'anstadnik/tmuxline.vim' " Using the above fork for lightline truecolor support " \ Plug 'edkolev/tmuxline.vim' -" NerdTree -Plug 'preservim/nerdtree', { 'on': 'NERDTreeToggle' } | - \ Plug 'Xuyuanp/nerdtree-git-plugin', { 'on': 'NERDTreeToggle' } | - \ Plug 'ryanoasis/vim-devicons' | - \ Plug 'tiagofumo/vim-nerdtree-syntax-highlight', { 'on': 'NERDTreeToggle' } +" NvimTree +Plug 'kyazdani42/nvim-tree.lua' | + \ Plug 'kyazdani42/nvim-web-devicons' " Vim-Markdown Plug 'godlygeek/tabular' | diff --git a/vimrc b/vimrc index ab494b9..1d7fed8 100644 --- a/vimrc +++ b/vimrc @@ -93,8 +93,8 @@ if filereadable(expand("~/.config/nvim/git.vimrc")) endif " NERDTree setup -if filereadable(expand("~/.config/nvim/nerdtree.vimrc")) - source ~/.config/nvim/nerdtree.vimrc +if filereadable(expand("~/.config/nvim/nvimtree.vimrc")) + source ~/.config/nvim/nvimtree.vimrc endif " Projections