summaryrefslogtreecommitdiff
path: root/.config/nvim/plug-config/nvimtree.vim
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2021-03-14 21:58:45 +0100
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2021-03-14 21:58:45 +0100
commit8577c3b7cba714551d3537f3337ee2490bd20106 (patch)
treee881c2058f73ee5e67c68fcfac0df4b80c7de632 /.config/nvim/plug-config/nvimtree.vim
parent7f9c2629c4eb416fcda906d6ad25457b7cff1e22 (diff)
started moving to pure lua config
Diffstat (limited to '.config/nvim/plug-config/nvimtree.vim')
-rw-r--r--.config/nvim/plug-config/nvimtree.vim51
1 files changed, 51 insertions, 0 deletions
diff --git a/.config/nvim/plug-config/nvimtree.vim b/.config/nvim/plug-config/nvimtree.vim
new file mode 100644
index 0000000..24b2721
--- /dev/null
+++ b/.config/nvim/plug-config/nvimtree.vim
@@ -0,0 +1,51 @@
+let g:nvim_tree_side = 'left' " | 'left' "left by default
+let g:nvim_tree_width = 40 "30 by default
+let g:nvim_tree_ignore = [ '.git', 'node_modules', '.cache' ] "empty by default
+let g:nvim_tree_auto_open = 0 "0 by default, opens the tree when typing `vim $DIR` or `vim`
+let g:nvim_tree_auto_close = 1 "0 by default, closes the tree when it's the last window
+" let g:nvim_tree_auto_ignore_ft = 'startify' "empty by default, don't auto open tree on specific filetypes.
+let g:nvim_tree_quit_on_open = 0 "0 by default, closes the tree when you open a file
+let g:nvim_tree_follow = 1 "0 by default, this option allows the cursor to be updated when entering a buffer
+let g:nvim_tree_indent_markers = 1 "0 by default, this option shows indent markers when folders are open
+let g:nvim_tree_hide_dotfiles = 1 "0 by default, this option hides files and folders starting with a dot `.`
+let g:nvim_tree_git_hl = 1 "0 by default, will enable file highlight for git attributes (can be used without the icons).
+" let g:nvim_tree_root_folder_modifier = ':~' "This is the default. See :help filename-modifiers for more options
+" let g:nvim_tree_tab_open = 1 "0 by default, will open the tree when entering a new tab and the tree was previously open
+" let g:nvim_tree_width_allow_resize = 1 "0 by default, will not resize the tree when opening a file
+let g:nvim_tree_disable_netrw = 0 "1 by default, disables netrw
+let g:nvim_tree_hijack_netrw = 0 "1 by default, prevents netrw from automatically opening when opening directories (but lets you keep its other utilities)
+let g:nvim_tree_show_icons = {
+ \ 'git': 1,
+ \ 'folders': 1,
+ \ 'files': 1,
+ \ }
+"If 0, do not show the icons for one of 'git' 'folder' and 'files'
+"1 by default, notice that if 'files' is 1, it will only display
+"if nvim-web-devicons is installed and on your runtimepath
+
+" default will show icon by default if no icon is provided
+" default shows no icon by default
+let g:nvim_tree_icons = {
+ \ 'default': '',
+ \ 'symlink': '',
+ \ 'git': {
+ \ 'unstaged': "✗",
+ \ 'staged': "✓",
+ \ 'unmerged': "",
+ \ 'renamed': "➜",
+ \ 'untracked': "ﭖ"
+ \ },
+ \ 'folder': {
+ \ 'default': "",
+ \ 'open': "",
+ \ 'empty': "",
+ \ 'empty_open': "",
+ \ 'symlink': "",
+ \ }
+ \ }
+
+nnoremap <leader>e :NvimTreeToggle<CR>
+nnoremap <leader>r :NvimTreeRefresh<CR>
+nnoremap <leader>n :NvimTreeFindFile<CR>
+" NvimTreeOpen and NvimTreeClose are also available if you need them
+highlight NvimTreeFolderIcon guibg=blue