Skip to content

Commit 0571175

Browse files
committed
renaming: lua-tree -> nvim-tree
1 parent 2e7118c commit 0571175

12 files changed

+192
-199
lines changed

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Tree.lua is a simple tree for neovim
1+
nvim-tree.lua is a file explorer / filesystem tree view plugin for neovim
22
Copyright © 2019 Yazdani Kiyan
33

44
This program is free software: you can redistribute it and/or modify

README.md

+27-34
Original file line numberDiff line numberDiff line change
@@ -2,43 +2,36 @@
22

33
## Notice
44

5-
This plugin doesn't support windows. \
6-
This plugin requires [neovim nightly](https://github.com/neovim/neovim/wiki/Installing-Neovim). \
7-
You can switch to commit `afc86a9` if you use neovim 0.4.x. \
8-
Note that the old version has less features and is much slower than the new one.
5+
This plugin doesn't support windows yet. \
6+
This plugin requires [neovim nightly](https://github.com/neovim/neovim/wiki/Installing-Neovim).
97

108
## Install
119

1210
Install with [vim-plug](https://github.com/junegunn/vim-plug):
1311

1412
```vim
15-
" master (neovim git)
13+
" requires
1614
Plug 'kyazdani42/nvim-web-devicons' " for file icons
1715
Plug 'kyazdani42/nvim-tree.lua'
18-
19-
" old version that runs on neovim 0.4.x
20-
Plug 'kyazdani42/nvim-tree.lua', { 'commit': 'afc86a9' }
21-
" for icons in old version
22-
Plug 'ryanoasis/vim-devicons'
2316
```
2417

2518
## Setup
2619

2720
```vim
28-
let g:lua_tree_side = 'right' | 'left' "left by default
29-
let g:lua_tree_width = 40 "30 by default
30-
let g:lua_tree_ignore = [ '.git', 'node_modules', '.cache' ] "empty by default
31-
let g:lua_tree_auto_open = 1 "0 by default, opens the tree when typing `vim $DIR` or `vim`
32-
let g:lua_tree_auto_close = 1 "0 by default, closes the tree when it's the last window
33-
let g:lua_tree_quit_on_open = 1 "0 by default, closes the tree when you open a file
34-
let g:lua_tree_follow = 1 "0 by default, this option allows the cursor to be updated when entering a buffer
35-
let g:lua_tree_indent_markers = 1 "0 by default, this option shows indent markers when folders are open
36-
let g:lua_tree_hide_dotfiles = 1 "0 by default, this option hides files and folders starting with a dot `.`
37-
let g:lua_tree_git_hl = 1 "0 by default, will enable file highlight for git attributes (can be used without the icons).
38-
let g:lua_tree_root_folder_modifier = ':~' "This is the default. See :help filename-modifiers for more options
39-
let g:lua_tree_tab_open = 1 "0 by default, will open the tree when entering a new tab and the tree was previously open
40-
let g:lua_tree_width_allow_resize = 1 "0 by default, will not resize the tree when opening a file
41-
let g:lua_tree_show_icons = {
21+
let g:nvim_tree_side = 'right' | 'left' "left by default
22+
let g:nvim_tree_width = 40 "30 by default
23+
let g:nvim_tree_ignore = [ '.git', 'node_modules', '.cache' ] "empty by default
24+
let g:nvim_tree_auto_open = 1 "0 by default, opens the tree when typing `vim $DIR` or `vim`
25+
let g:nvim_tree_auto_close = 1 "0 by default, closes the tree when it's the last window
26+
let g:nvim_tree_quit_on_open = 1 "0 by default, closes the tree when you open a file
27+
let g:nvim_tree_follow = 1 "0 by default, this option allows the cursor to be updated when entering a buffer
28+
let g:nvim_tree_indent_markers = 1 "0 by default, this option shows indent markers when folders are open
29+
let g:nvim_tree_hide_dotfiles = 1 "0 by default, this option hides files and folders starting with a dot `.`
30+
let g:nvim_tree_git_hl = 1 "0 by default, will enable file highlight for git attributes (can be used without the icons).
31+
let g:nvim_tree_root_folder_modifier = ':~' "This is the default. See :help filename-modifiers for more options
32+
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
33+
let g:nvim_tree_width_allow_resize = 1 "0 by default, will not resize the tree when opening a file
34+
let g:nvim_tree_show_icons = {
4235
\ 'git': 1,
4336
\ 'folders': 0,
4437
\ 'files': 0,
@@ -50,7 +43,7 @@ let g:lua_tree_show_icons = {
5043
" You can edit keybindings be defining this variable
5144
" You don't have to define all keys.
5245
" NOTE: the 'edit' key will wrap/unwrap a folder and open a file
53-
let g:lua_tree_bindings = {
46+
let g:nvim_tree_bindings = {
5447
\ 'edit': ['<CR>', 'o'],
5548
\ 'edit_vsplit': '<C-v>',
5649
\ 'edit_split': '<C-x>',
@@ -73,11 +66,11 @@ let g:lua_tree_bindings = {
7366
7467
" Disable default mappings by plugin
7568
" Bindings are enable by default, disabled on any non-zero value
76-
" let lua_tree_disable_keybindings=1
69+
" let nvim_tree_disable_keybindings=1
7770
7871
" default will show icon by default if no icon is provided
7972
" default shows no icon by default
80-
let g:lua_tree_icons = {
73+
let g:nvim_tree_icons = {
8174
\ 'default': '',
8275
\ 'symlink': '',
8376
\ 'git': {
@@ -94,15 +87,15 @@ let g:lua_tree_icons = {
9487
\ }
9588
\ }
9689
97-
nnoremap <C-n> :LuaTreeToggle<CR>
98-
nnoremap <leader>r :LuaTreeRefresh<CR>
99-
nnoremap <leader>n :LuaTreeFindFile<CR>
100-
" LuaTreeOpen and LuaTreeClose are also available if you need them
90+
nnoremap <C-n> :NvimTreeToggle<CR>
91+
nnoremap <leader>r :NvimTreeRefresh<CR>
92+
nnoremap <leader>n :NvimTreeFindFile<CR>
93+
" NvimTreeOpen and NvimTreeClose are also available if you need them
10194
10295
set termguicolors " this variable must be enabled for colors to be applied properly
10396
104-
" a list of groups can be found at `:help lua_tree_highlight`
105-
highlight LuaTreeFolderIcon guibg=blue
97+
" a list of groups can be found at `:help nvim_tree_highlight`
98+
highlight NvimTreeFolderIcon guibg=blue
10699
```
107100

108101
## KeyBindings
@@ -126,7 +119,7 @@ highlight LuaTreeFolderIcon guibg=blue
126119
- `<C-x>` will open the file in a horizontal split
127120
- `<C-t>` will open the file in a new tab
128121
- `<Tab>` will open the file as a preview (keeps the cursor in the tree)
129-
- `I` will toggle visibility of folders hidden via |g:lua_tree_ignore|
122+
- `I` will toggle visibility of folders hidden via |g:nvim_tree_ignore|
130123
- `H` will toggle visibility of dotfiles (files/folders starting with a `.`)
131124
- `R` will refresh the tree
132125
- `gx` opens the file with the `open` command on MACOS and `xdg-open` in linux

0 commit comments

Comments
 (0)