Commit Graph

1331 Commits

Author SHA1 Message Date
kiyan
7abec5e594 fix(sshfs): use stat to get the filetype when fs_scandir does not return the type 2021-06-30 22:29:11 +02:00
booperlv
d311c22d46
add option to make width a percentage of "&columns" (#473) 2021-06-30 21:55:41 +02:00
kiyan
10e845e01c BREAKING CHANGE: make keybindings more configurable and add option to disable default 2021-06-30 21:54:17 +02:00
kiyan
86188a4b9d fix(resize): reimplement auto resize 2021-06-30 21:21:06 +02:00
kiyan
768788476e chore(async): schedule git on refresh 2021-06-30 19:47:34 +02:00
Kiyan
a80ea23b4c
fix ci (#477) 2021-06-29 23:13:28 +02:00
kiyan
ed668a9c10 chore(luacheck): fix luacheck issues 2021-06-29 22:17:40 +02:00
kiyan
b31003e43a chore(git): schedule status update and redraw when git status update is done 2021-06-29 22:02:37 +02:00
kiyan
c1b112f0ec fix(git): manage T porcelain status 2021-06-29 20:50:29 +02:00
kiyan
92ee4471fd fix(picker): enable relative windows 2021-06-29 10:15:25 +02:00
kiyan
ed7f3851d1 fix(picker): do not select floating windows 2021-06-28 20:31:15 +02:00
kiyan
a59a4120a4 chore(help ui): switch ? to g? because ? is for backward search 2021-06-28 20:05:48 +02:00
kiyan
a41f04c7e0 feat(on_leave): add closing tab when it's last window in tabpage 2021-06-28 20:00:03 +02:00
Luke Kershaw
a06f949607
feat: Help UI for keybindings (#470) 2021-06-28 19:38:05 +02:00
lvim-tech
bfeaf4c8ef
Remove cursorcolumn and colorcolumn (#445) 2021-06-15 21:49:40 +02:00
kiyan
4a043ff5eb hotfix git state AA 2021-06-11 16:19:08 +02:00
kiyan
906a35cd0e fix: do not change dir on win changed and fix going up a dir 2021-06-09 07:46:28 +02:00
kiyan
714dee57e5 fix: do not load cwd on each init call to avoid double rendering at startup when doing vim DIR 2021-06-07 20:18:19 +02:00
kiyan
3196205131 chore: switch cd to lcd and update root on dirchanged 2021-06-07 20:09:48 +02:00
kiyan
f1f14885f7 add icon padding 2021-06-07 17:34:02 +02:00
kiyan
82f1598bd4 apply merge before checking git 2021-06-05 11:49:41 +02:00
kiyan
f56ac7884c fix: leave the cursor moving when going on the cwd 2021-06-05 10:53:04 +02:00
kiyan
8cf639c821 Revert "fix: use fnameescape to escape the path for use in cmds"
This reverts commit 58d7c8d178.
2021-06-04 09:02:13 +02:00
kiyan
f5931bd96b remove useless check 2021-06-04 08:28:22 +02:00
kiyan
58d7c8d178 fix: use fnameescape to escape the path for use in cmds
INFO: could potentially lead to issues, might need to revert
2021-06-04 08:25:21 +02:00
kiyan
747bce0c66 fix: wait for win opening before running place_cursor_on_node 2021-06-04 08:15:45 +02:00
Kiyan
6dca42d09d
feat: hijack cursor (#428) 2021-06-02 19:28:27 +02:00
kiyan
34a657fd5a hotfix: proper alignment for folder arrow 2021-06-02 19:11:53 +02:00
Kiyan
d51ed722ed
add small arrows before folders (#427) 2021-06-02 18:45:25 +02:00
kiyan
45c331230c fix: handle UD status as git merge 2021-06-01 21:01:05 +02:00
Luís Simas
be784713d5
Improve icon fetching by file extension (#423) 2021-06-01 20:40:00 +02:00
Sindre T. Strøm
aa026ab87c
Revert "feat: reset old window when leaving the tree" (#421) 2021-05-31 22:46:54 +02:00
Sindre T. Strøm
9aed1acb47
fix: Gitignore rules not being applied on new nodes. (#415) 2021-05-31 09:12:59 +02:00
kiyan
be184bd94e feat: reset old window when leaving the tree 2021-05-28 09:13:37 +02:00
Sindre T. Strøm
23935ff003
feat: Option for excluding buffers from the window picker. (#401) 2021-05-27 09:19:10 +02:00
Sindre T. Strøm
1499360359
fix(lib): Refresh tree if it was opened before init. (#399) 2021-05-26 09:56:15 +02:00
kiyan
d008e9d4a0 feat: focus file/dir on creation 2021-05-25 22:00:57 +02:00
Alexander Popov
0c97e6406c
add pick guard for focusable (#398) 2021-05-25 20:05:33 +02:00
Sindre T. Strøm
f61ea4dc04
fix(lib): Handle nvim_win_get_option correctly when it fails. (#394) 2021-05-25 19:58:37 +02:00
Sindre T. Strøm
5e7e5f2949
feat(lib): Improved tabnew behavior. (#395) 2021-05-25 19:53:43 +02:00
Zi莱卷
d6ab59fd5a
feat: Support copy name and path (#385) 2021-05-21 08:32:48 +02:00
kiyan
ef570074e0 fix: vim.v returns vim.NIL not nil anymore 2021-05-20 22:37:55 +02:00
Carlos Afonso
18fffc09bf
Improve highlight options (#331) 2021-05-20 21:44:36 +02:00
Sindre T. Strøm
12dd571202
fix(lib): Fix the tabnew callback. (#386) 2021-05-20 21:43:06 +02:00
Sindre T. Strøm
10c686f7df
feat: Implement window picker. (#340) 2021-05-19 23:30:15 +02:00
kiyan
4706b74938 hotfix dir up 2021-05-19 23:27:26 +02:00
kiyan
825cf570bf fix: open on tabpage when tree is already open only 2021-05-17 22:32:36 +02:00
Kristijan Husak
577df96b07
Set nowait on mappings to avoid timeout for conflicting mappings. (#375) 2021-05-17 22:24:47 +02:00
Sindre T. Strøm
624bec7ecd
refactor: open_file (#345) 2021-05-17 22:13:30 +02:00
Sindre T. Strøm
f09143900b
fix(renderer): Fix option check for highligt_opened_files (#352) 2021-05-17 21:56:39 +02:00
Sindre T. Strøm
b8c5a089fa
fix(renderer): Ensure buffer is loaded. (#351) 2021-05-17 21:55:10 +02:00
Sindre T. Strøm
8bc814de2b
fix(git): Fix shell args on windows. (#349) 2021-05-17 21:54:19 +02:00
kiyan
e9f4f5e1b4 fix: DU git state 2021-05-17 21:52:40 +02:00
kiyan
73b514e090 fix: update git state 2021-05-17 21:46:39 +02:00
kiyan
6c9927180f fix: highlight first character when trailing is activated 2021-05-17 21:40:28 +02:00
Sindre T. Strøm
f398695146
Simplify some of the git icon states. (#339) 2021-04-22 22:29:20 +02:00
kiyan
468638e7e0 chore: remove unused code 2021-04-22 22:05:52 +02:00
Cameron
0d8e6f58ec
Change filesystem actions to be immediate, minor changes to UX (#338) 2021-04-22 21:37:26 +02:00
Sindre T. Strøm
c2d71046c6
fix(git): Fix the gitignore implementation. (#335) 2021-04-22 21:32:10 +02:00
Sindre T. Strøm
027e523431
feat: Sort nodes sensibly (#334) 2021-04-22 21:12:47 +02:00
Sindre T. Strøm
96d8e20bff
Set highlight links for NvimTreeStatusLine (#330) 2021-04-21 20:40:49 +02:00
Sindre T. Strøm
796628a765
Update symlinks if they have been modified. (#328) 2021-04-20 23:48:23 +02:00
Sindre T. Strøm
c235df7aaa
Rename the rogue buffer. (#327) 2021-04-20 23:44:24 +02:00
Akin
983963779d
feat: add statusline winhighlight to explorer tree (#326) 2021-04-20 19:59:32 +02:00
Sindre T. Strøm
e3516eeb6e
fix(diagnostics): Update lsp diagnostics signs when opening/closing folders. (#325) 2021-04-20 18:38:28 +02:00
kiyan
c995d65b7d fix: put resize before preview ends 2021-04-19 23:59:37 +02:00
Sindre T. Strøm
f275d3faae
fix(view): Fix error thrown when trying to wipe buffer in autocmd window. (#314) 2021-04-18 18:43:24 +02:00
Kiyan
783870cda9
fix: handle new tabs properly (#313) 2021-04-18 11:11:56 +02:00
kiyan42
75cb2232f2 fix: reset highlight using old lib.Tree.bufnr 2021-04-17 21:35:27 +02:00
kiyan42
2fffd847bd fix: keybindings not being set 2021-04-17 21:31:02 +02:00
kiyan42
a0c1d9d2b5 fix: prevent_buffer_override
- vim.schedule the buffer override autocmd to avoid being done before
  other ones thus failing some of the cursor movement
- pcall the nvim_win_set_cursor to avoid failing when cursor is out of
  the window
2021-04-17 21:03:27 +02:00
kiyan42
3d2144c73c fix SignColumn should be NvimTreeNormal 2021-04-17 17:10:28 +02:00
kiyan
dc59fa484d feat: add command to prevent nvim-tree window override by another buffer 2021-04-16 23:07:10 +02:00
Sindre T. Strøm
4ee45d9261
fix(view): Recreate tree buffer if deleted, and handle scenario where buffer already exists. (#307) 2021-04-16 22:32:54 +02:00
kiyan
48b06ed0ce add special_files option 2021-04-16 21:59:13 +02:00
kiyan
4b24a16ca1 ask user for quitting nvim when nvim-tree is the last window 2021-04-16 21:50:43 +02:00
Sindre T. Strøm
da09da3318
feat(diagnostics): More responsive and configurable diagnostics signs. (#303) 2021-04-16 17:57:16 +02:00
Sindre T. Strøm
090697e71f
Add a ready event. (#302) 2021-04-16 09:32:46 +02:00
Sindre T. Strøm
4271180aea
Don't create a new empty buffer on every open. (#300) 2021-04-16 09:32:27 +02:00
kiyan
b5ef2fb7f8 add better lsp diagnostic integration 2021-04-16 00:03:56 +02:00
kiyan
75338221b0 switching to buffer -> to avoid bufwinenter being ignored 2021-04-15 23:03:41 +02:00
kiyan
84052991cd fix calling winnr function 2021-04-15 22:14:37 +02:00
kiyan
f7047d63c8 highlight signcolumn as normal in tree window 2021-04-14 23:50:46 +02:00
kiyan
91c3d1b5eb do not follow global hide options for buffer 2021-04-14 23:46:44 +02:00
kiyan
ce7b1861ad remove noautocmd wincmd which breaks some functionnalities 2021-04-14 23:25:59 +02:00
Dmitriy
5c339e5a00
fix lsp diagnostics highligth: find_node index, bufnr (#295) 2021-04-14 23:03:25 +02:00
kiyan42
ed6971d88a fix: close is in view, not in lib 2021-04-14 12:01:40 +02:00
kiyan42
d065927322 hotfix forgot to switch win open to view in on_leave call 2021-04-14 09:21:11 +02:00
Kiyan
ff814676d5
chore: rewrite buffer/window handling into view file (#287) 2021-04-13 23:54:01 +02:00
Carlos Afonso
c2f2c665d8
Feat/icon highlighting for opened files and directories (#258) 2021-04-13 20:12:21 +02:00
Kiyan
82b20f5b5e
feat: nvim lsp integration (#260) 2021-04-08 23:30:35 +02:00
Sindre T. Strøm
50d31fb7f3
feat: Highlight gitignored files (and fix g:nvim_tree_gitignore) (#268) 2021-04-08 22:52:56 +02:00
Kiyan
81269a6eba
chore: remove async to avoid unecessary complexity (#277) 2021-04-08 22:36:17 +02:00
William Boman
bbb8d6070f
add event API (#265) 2021-04-06 21:13:21 +02:00
Kiyan
b48274ced0
fix(file creation): avoid file overwrite and enable creating file on root node (#272) 2021-04-06 19:34:10 +02:00
Per Larsson
3350e4e97e
Use platform path separator when setting tree index. (#269) 2021-04-05 22:01:02 +02:00
Carlos Afonso
de93da78a9
Feat/add advanced navigation (#257) 2021-04-03 00:38:28 +02:00
Santos Gallegos
1daf99cf26
Gitignore: fix ignoring directories (#266) 2021-04-03 00:34:30 +02:00
Sindre T. Strøm
ed23e1df1c
feat: preserve the file tree buffer (#249) 2021-03-31 21:44:55 +02:00
peach lasagna
1f1b25de4b
fix gitignore feature (#264) 2021-03-31 21:37:29 +02:00
Sindre T. Strøm
f0338fc55b
feat: Add command to focus tree window regardless of window state (#250) 2021-03-31 21:29:56 +02:00
peach lasagna
eadead6072
add Gitignore (#251) 2021-03-30 20:11:25 +02:00
Sindre T. Strøm
709d6b968b
feat: Option for grouping empty directories (#247) 2021-03-26 19:24:03 +01:00
kiyan
e0b9882a8a fix: set back winhl on the tree window 2021-03-23 21:04:33 +01:00
yamatsum
1e946c5855
feat: add option for changing symlink opened folder. (#242) 2021-03-22 17:34:30 +01:00
kiyan
f7ad4ce5f4 feat: add trailing slash on folder names
enable the feature through `vim.g.nvim_tree_add_trailing`
2021-03-16 21:26:03 +01:00
Levi Rizki Saputra
4c46d2b192
fix vim.g.nvim_tree_git_hl is not work (#232)
- it doest not disable git status reloading
2021-03-14 19:29:01 +01:00
Kassio Borges
784bba77c5
NvimTreeFindFile open a window in current tab (#228)
Fixes #225
2021-03-10 22:24:22 +01:00
Federico Scodelaro
31ef294d05
Patch windows (#222) 2021-03-09 20:12:10 +01:00
kiyan42
411e3412d1 hotfix: check that foreground is not empty string to avoid errors 2021-03-09 09:16:18 +01:00
kiyan
7e3534c2bc fix: load Vim's highlight groups foreground as hex 2021-03-08 00:16:41 +01:00
kiyan42
58e44d29d7 chore: update documentation for tree mappings 2021-03-06 12:49:30 +01:00
kiyan
905afba209 chore: refacto binding initialization (inverse mapping table) 2021-02-23 00:31:47 +01:00
kiyan
491fd68d62 fix: regression on create (do not open node) 2021-02-22 21:47:51 +01:00
kiyan
0136801444 chore: rename lib folder to nvim-tree
Allows external access to the lua api and follow neovim plugins better
practices
2021-02-22 21:02:23 +01:00
kiyan
07da8a7242 feat/fix: add rename cmd, fix rename error
- add <C-r> binding to omit the filename on rename (option is
  full_rename).
- call `silent! write!` on rename to avoid the `overwrite existing file`
  error when saving the buffer.
2021-02-22 20:54:53 +01:00
kiyan
ce2420b9da remove custom gx command in favor of netrw functionnalities and add documentation for netrw hijack 2021-02-21 12:27:31 +01:00
Cooper b. Anderson
894acce5ef Fix error when reading restricted directory 2021-02-21 00:05:03 +01:00
RedBug312
3bd96e3caa Fix dependency problem
require 'nvim-web-devicons' fails if colors.setup done in plugin/. This
may be related to loading order.
2021-02-19 18:09:59 +01:00
RedBug312
c9ed6c804b Move NvimTreePopup highlight link 2021-02-19 18:09:59 +01:00
RedBug312
25208ed91d Avoid colors.setup() being deferred 2021-02-19 18:09:59 +01:00
Cooper b. Anderson
48cd6a1ad3 Add NvimTreeEmptyFolderName to docs 2021-02-19 09:40:19 +01:00
Cooper b. Anderson
9650c0ed9d Add empty directory highlight group 2021-02-19 09:40:19 +01:00
Cooper b. Anderson
6647f96739 Fix empty dir icons updating incorrectly 2021-02-19 09:40:19 +01:00
Cooper b. Anderson
4579c6d2b9 Make empty dir icons auto update 2021-02-19 09:40:19 +01:00
Cooper b. Anderson
25b414051f Add empty directory icons 2021-02-19 09:40:19 +01:00
Sebastian Lyng Johansen
7531c7023d fix bug for pattern recogniti
on of filename
2021-02-18 23:57:06 +01:00
Sebastian Lyng Johansen
bc8fa41d80 change behaviour of rename 2021-02-18 23:57:06 +01:00
kiyan
58a5e4ab48 fix: set deleted staged git status 2021-02-16 20:30:34 +01:00
kiyan42
bb7054fe79 remove log call 2021-02-16 09:40:15 +01:00
kiyan42
42a875aa00 fix: do not run refresh if vim.v.exiting is set 2021-02-15 09:57:43 +01:00
kiyan42
19418e898e fix: is_bufnr_valid by checking if buffer is loaded 2021-02-15 09:35:12 +01:00
dorgnarg
aab0a136ac
Give users the option to enable netrw 2021-02-15 09:28:28 +01:00
kiyan
5b428c014a fix: check for loaded buffers before deleting 2021-02-14 17:18:59 +01:00
Sergey Bulavintsev
c59831a5d1 Add opt to don't open tree on specific filetypes 2021-02-11 21:17:15 +01:00
elianiva
b285257876 fix: escape filename before opening it 2021-01-22 09:35:29 +01:00
Joel D. Elkins
bfc9606aa0 Variable should be local 2021-01-20 18:44:58 +01:00
Joel D. Elkins
92da0c78a3 Remove unused variable 2021-01-20 18:44:58 +01:00
Joel D. Elkins
75e7bb8a16 table.remove takes only 2 arguments 2021-01-20 18:44:58 +01:00
Joel D. Elkins
cbcd61b053 Only do git status -u if status.showUntrackedFiles = true
Some git use cases, specifically where $HOME is a git worktree with
a bare git repo somewhere else, really get bogged down if you do
`git status -u`. This overcomes that issue.
2021-01-20 18:43:41 +01:00
Joel D. Elkins
32640f7689 Remove unused check_and_open_split() 2021-01-20 18:38:39 +01:00
Joel D. Elkins
35e640fb25 Honor 'hidden' setting when deciding whether to split window 2021-01-20 18:38:39 +01:00
David
bf59dd4a86 make function local to avoid conflicts :) 2021-01-17 23:28:17 +01:00
David
6b6f8f1b6b fixes #175 | early return if internal state is invalid(does not match nvim's state 2021-01-17 23:28:17 +01:00
li
01ae59823c add close binding 2021-01-17 23:26:45 +01:00
Joel D. Elkins
787cef2a1d Use vim.fn instead of vim.api.nvim_eval 2021-01-15 19:35:38 +01:00
Joel D. Elkins
bacb987b77 Execute action in target window if possible
Change lib.open_file semantics somewhat to open files in the window from
which the tree was opened, if possible. I call this window the target.
If the buffer in the target window is modified, then execute the
desired configured split (split or vsplit) relative to the target. If
the target is unmodified, open the selected node in the target, hiding
the buffer. If the selected node is already visible in a window, don't
do any of the foregoing; instead, just jump to that window. If the
target has been closed, the preserve the original semantics.
2021-01-15 19:35:38 +01:00
Joel D. Elkins
e935ec3bb0 When re-opening the tree buffer, navigate to the target window's working dir 2021-01-15 19:31:44 +01:00
Joel D. Elkins
52a2905135 On dir_up, keep the current node selected and visible 2021-01-15 19:31:44 +01:00
Joel D. Elkins
0a4123b71f Move dir_up functionality into lib and make '-' a default keymap for it 2021-01-15 19:31:44 +01:00
Joel D. Elkins
361e20ecfa Add dir_up function to expose navigating up one directory 2021-01-10 16:07:02 +01:00
kiyan42
05711754d9 renaming: lua-tree -> nvim-tree 2020-12-27 19:14:34 +01:00
kiyan
2e7118ca17 check buffer is valid when renaming 2020-12-23 00:02:43 +01:00
Yiqun Ding
5080c5c44c fix file icon length 2020-12-20 18:32:11 +01:00
kiyan
bc8245c7bb enable sign column by default to have a little padding 2020-12-16 19:20:21 +01:00
cqroot
2cd12d01f8 fix: missing local 2020-12-15 20:04:59 +01:00
cqroot
043678c7bb feat: g:lua_tree_ignore support *.extension 2020-12-15 20:04:59 +01:00
ttys3
c84b8b4ab9 feat: auto close: avoid force user to press Enter key to exit
with `let g:lua_tree_auto_close = 1`, while closing the tree when it's the last window,
neovim ask the user: "Press ENTER or type command to continue"

this patch should fixup the problem
2020-12-14 22:04:31 +01:00
Simon Zeng
9aa8be639d Add nil check for link_to 2020-12-14 22:01:24 +01:00
kiyan
0862bcc08e allow opening symlink to folders 2020-12-13 17:13:35 +01:00
kiyan
033b465f34 add RM state and ' A' to hl groups 2020-12-13 16:52:23 +01:00
kiyan
7e6177b8ff new file untracked is git dirty, new file unstaged is git new 2020-12-13 16:48:12 +01:00
kiyan
e7fe054ef1 back to basic functionnalities with nvimtreefindfile 2020-12-10 00:03:57 +01:00
kiyan
811dacfb98 find file sets cursor on file if tree is open 2020-12-09 22:03:39 +01:00
Rafael Bodill
54403415ed Add close_node action to close parent directory 2020-12-07 01:45:09 +01:00
kiyan
2bf0043409 fix issue with data race when opening with luatreefindfile 2020-12-02 20:39:56 +01:00
Yiqun Ding
4b1fa51e4f fix tree winnr 2020-11-30 23:27:22 +01:00
kiyan
9c3bc7d031 also schedule open and follow 2020-11-29 20:16:57 +01:00
kiyan
ba4dac1e59 wrap refresh logic in vim.schedule callback 2020-11-29 20:16:57 +01:00
kiyan
d3eb9cc4c6 fix git root for v1 (monkeypatch) 2020-11-22 16:34:02 +01:00
Morten Paulsen
ef893b523d g:lua_tree_quit_on_open respects preview 2020-10-31 20:39:46 +01:00
Raphael
0602058af5 no wrap in luatree buffer 2020-10-30 18:14:52 +01:00
Jan Sipr
521f2cfb5c Fix lua_tree_quit_on_open configuration option 2020-10-30 08:04:59 +01:00
kiyan42
ebf6f2a21a monkeypatch to open tree after processing all startup files and setting first filetype 2020-10-26 21:12:49 +01:00
kyazdani42
6c2ee96207 open tree on package load instead of vimEnter 2020-10-24 09:11:11 +02:00
kyazdani42
b55cc721da fix update git hl on refresh even if git icons are disabled 2020-10-24 09:07:07 +02:00
kyazdani42
48d433d059 fix allow_resize and document it 2020-10-24 09:04:02 +02:00
jasilven
87a4d60bbc feat: allow window width resize 2020-10-21 10:13:30 +02:00
kiyan42
1ba25ce088 open tree even when file doesn't exists 2020-10-19 23:05:43 +02:00
johnpyp
c496c8b9d9 Add main quit-on-open functionality 2020-10-17 12:24:20 +02:00
Zach Coyle
47cd138808 add edge-cases around deleting/staging 2020-10-14 10:02:38 +02:00
kyazdani42
640d147d70 fix small issue with cursor not being placed on the last line with a folder 2020-09-12 12:30:46 +02:00
kyazdani42
385daf2108 fix cd to path with symbols need " 2020-09-12 12:20:24 +02:00
Kristijan Husak
bbf517dbb5 Add option to rename files when copying/moving. Closes #95. 2020-09-05 11:05:43 +02:00
kiyan42
9eea2b8c62 feat: add ability for the tree to change tab
- remove tags file
- open/close the tree on `TabEnter` with the option `g:lua_tree_tab_open`
2020-08-18 19:11:10 +02:00
kiyan42
51323b00a4 fix render bug with special files 2020-08-11 17:17:13 +02:00
kiyan42
114dee0d9b fix folder hl function with folder icon disabled 2020-08-11 17:12:52 +02:00
Santos Gallegos
222732d9d4 Fallback to default icon for symlinks and fix padding
Fixes https://github.com/kyazdani42/nvim-tree.lua/issues/80
2020-08-10 18:35:07 +02:00
Kristijan Husak
62846b1e31 Print warning when git state is not recognized. 2020-08-06 11:51:28 +02:00
Kristijan Husak
9cad30f1be Handle git deleted state. 2020-08-06 11:51:28 +02:00
kiyan42
505d63a3e7 use nvim devicon colors and fix empty space before file 2020-08-04 21:08:47 +02:00
kiyan42
2c453c9b9f fix git highlight works without the icons 2020-08-04 20:45:31 +02:00
Kristijan Husak
859be0bb76 Merge root folder and parent navigator into one. 2020-08-03 21:29:02 +02:00
Kristijan Husak
0d8b22c1e9 Allow mapping multiple keys to single action. 2020-08-03 21:29:02 +02:00
Kristijan Husak
caf238d908 Add root folder name. 2020-08-03 21:29:02 +02:00
Akin Sowemimo
2a3c9cfd12 If set to follow find the file on open 2020-08-03 17:54:28 +02:00
Kieran Siek
06558a25da
Feat: Allow hiding dotfiles (#69) 2020-08-03 16:13:25 +02:00
Kristijan Husak
73ffc3d4aa Inherit git status from nested files on directory. 2020-08-03 15:21:10 +02:00
kiyan42
98fc65750a fix: always open new window and set window options locally
- use setlocal for options instead of using nvim_win_set_option
- create a new window when there is only the tree window
- resize the tree when opening new files
2020-08-03 14:04:26 +02:00
kiyan42
600853ec4d fix space between icon and filename with special file 2020-08-03 12:38:15 +02:00
kiyan42
b72f0bfffd change folder icons, folder colors 2020-08-03 10:53:40 +02:00
kiyan42
a25ac38db1 add file highlight for git attributes and remove the space before the git icon 2020-08-03 10:31:23 +02:00
kiyan42
c552a4f4f5 refacto display and add LuaTreeFolderDirty group 2020-08-03 10:29:54 +02:00
Kiyan Yazdani
4c073c952a
Merge pull request #71 from stsewd/allow-align-icons
Icons: allow setting a string as file icon
2020-08-02 18:50:42 +02:00
Santos Gallegos
a2e0db6123 Icons: allow setting a string as file icon
Closes https://github.com/kyazdani42/nvim-tree.lua/issues/45
2020-08-02 11:40:51 -05:00
Santos Gallegos
bafee954ac KeyBindings: add refresh 2020-08-02 11:05:05 -05:00
Kristijan Husak
d42e76e3cf Always focus tree when finding file. 2020-07-29 18:03:27 +02:00
kiyan42
6ac8e256b3 cleanup on_keypress function 2020-07-23 11:48:16 +02:00
kiyan42
2ceb049b5b lints 2020-07-23 11:40:39 +02:00
kiyan42
371941b3b2 find window instead of saving it 2020-07-23 11:36:58 +02:00
kiyan42
33a48cd80f open tree on find 2020-07-23 11:16:25 +02:00
Kristijan Husak
28c300acb4 Cache functions for jumping to prev/next git item. 2020-07-22 12:29:52 +02:00
Kristijan Husak
f1b04965de Add mappings for jumping to previous or next git item. 2020-07-22 11:50:18 +02:00
Kiyan Yazdani
7743d90504
Merge pull request #52 from kristijanhusak/feature/cut-copy-paste
Add cut,copy and paste functionality.
2020-07-21 17:16:08 +02:00
Kristijan Husak
89df407737 Add command to print clipboard content. 2020-07-21 15:14:05 +02:00
Kristijan Husak
7ddee0a79c Return if pasting on root and remove continue. 2020-07-21 12:35:28 +02:00
kiyan42
df3c470322 fix: remove goto statement to match neovim lua version 2020-07-21 11:57:13 +02:00
Kristijan Husak
86ff3b725f Prompt for confirmation when overwriting on cut/copy actions. 2020-07-21 08:58:09 +02:00
Kristijan Husak
37748e7c97
Merge branch 'master' into feature/cut-copy-paste 2020-07-20 17:59:15 +02:00
Kristijan Husak
4f86707051 Add mapping for toggling ignored folders visibility. 2020-07-17 10:25:57 +02:00
Kristijan Husak
9b20fcba72 Add cut,copy and paste functionality. 2020-07-16 11:50:27 +02:00
kiyan42
20f39a951a fix: markers not rendering properly on last indent 2020-06-22 14:47:50 +02:00
kiyan42
3ca7fd0aed fix small bug with indent markers, add notice to README for netrw and gx 2020-06-22 12:23:09 +02:00
kiyan42
cf828e0a4b fix: export find_file, remove global options, disable follow by default 2020-06-21 12:50:51 +02:00
kiyan42
4f499d9e53 finish indent markers properly 2020-06-20 15:35:24 +02:00
kiyan42
7988dd407c add indent markers 2020-06-20 15:34:49 +02:00
rickysaurav
080c86618f Add option for disabling bindings 2020-06-20 03:38:36 +05:30
kiyan42
fbe5d6d1f7 add akin909 screenshot, fix user icon config load 2020-06-19 13:31:42 +02:00
kiyan42
d4e5b1bb51 fix: declare filetype when window init is done 2020-06-15 15:30:18 +02:00
Gregory
509f0e0c3b
Improve icon fetching logic 2020-06-13 20:39:43 -04:00
kyazdani42
896cc1619a fix various issues, and add a comment because of a bug in glibc 2020-06-09 18:59:32 +02:00
kyazdani42
899fb177e0 use path to matching str in lua/tree.lua 2020-06-08 12:33:42 +02:00
kyazdani42
25c32283b8 rename lib/tree.lua to lib/lib.lua 2020-06-08 11:41:57 +02:00
kyazdani42
18dac0ed84 add .luacheckrc and fix linter issues 2020-06-08 11:23:30 +02:00
kyazdani42
1e67a7c6f4 refacto: export window options in config 2020-06-08 11:09:53 +02:00
kyazdani42
b55ed7c5a7 add preview 2020-06-07 14:51:46 +02:00
kyazdani42
e9548d7992 fix: check for nil bufnr to avoid messing up the UI when rendering 2020-06-05 19:17:11 +02:00
kyazdani42
d0d42d42a3 fix: fs and refresh bugs
- refreshing delete from entries before adding new entries to avoid
  conflicts with indexes
- delete is synchronous because on large folders it was not recursing
  properly thus causing errors and not deleting content.
2020-06-05 09:33:14 +02:00
kyazdani42
f6b38bb364 fix: use defer_fn to close the tree properly 2020-06-04 23:29:10 +02:00
kyazdani42
f740fc5d1e fix: cwd with spaces failing to cd 2020-06-04 21:54:53 +02:00
Marek Konopka
ff76ccafdc Add configurable folder icons 2020-06-02 13:33:03 +02:00
kiyan42
870d60ec54 fix do not update on save when window is closed 2020-06-01 20:15:55 +02:00
kiyan42
69880f2e40 fix git error 2020-06-01 18:13:12 +02:00
kiyan42
df0c522a81 fix lua path matching again 2020-06-01 16:06:23 +02:00
kiyan42
9342527d28 optimize git with buffering 2020-05-31 00:55:02 +02:00
kiyan42
d6f9b6a21c fix rendering before setting cursor pos in refresh 2020-05-31 00:22:20 +02:00
kiyan42
058cd31e2a better logic for closing the tree 2020-05-30 01:55:29 +02:00
kiyan42
e4630f8782 fix creating a file wrong permissions 2020-05-29 21:13:43 +02:00
kiyan42
36828c18f8 fix buf options are window options 2020-05-29 20:58:55 +02:00
kiyan42
e0bfcb4a6f Refacto: rewrite everything
- The tree is created with libuv functions, which makes it blazingly fast.
- The tree may now be faster than any other vim trees, it can handle directories with thousands of files without any latency at all (tested on 40K files, works flawlessly).
- More solid logic for opening and closing the tree.
- tree state is remembered (closing / opening a folder keeps opened subdirectories open)
- detection of multiple git projects in the tree
- more icon support
- smart rendering
- smart updates
- ms windows support
- gx replacement function running xdg-open on linux, open on macos
2020-05-29 15:33:47 +02:00
kiyan42
afc86a9623 fix folder name links to hl-Directory 2020-05-22 11:59:20 +02:00
kiyan42
e1fbabf879 fix init_tree should not run when root path doesnt change 2020-05-18 23:56:56 +02:00
Akin Sowemimo
9201d123fd Add config option to follow buffer directory 2020-05-18 23:51:43 +02:00
kiyan42
5fcbc21edb fix opening a file should change the tree base 2020-05-18 20:01:19 +02:00
kiyan42
042d612d68 fix path matching again 2020-05-18 17:51:17 +02:00
kiyan42
0ca069459a remove print 2020-05-17 18:23:47 +02:00
kiyan42
020db73532 Add colorscheme update and add filetype to buffer. 2020-05-17 18:21:03 +02:00
kiyan42
52d1d7e401 fix: 'cd ..' going above the main dir of project 2020-05-14 16:35:06 +02:00
kiyan42
697912429c reformat, refactor code, run fs command with luv.spawn 2020-04-26 14:46:20 +02:00
kiyan42
81ee46e41d fix: print_err not being defined 2020-04-25 16:26:29 +02:00
kiyan42
60adbfbdf3 fix: refacto path matchings throughout the code, change the way we call string methods 2020-04-25 15:11:14 +02:00
kiyan42
7fbcfa531c fix: relative paths with '-' breaking git
relative paths with '-' inside a `string.match` statement were not
matching properly due to the nature of lua matching patterns. Replacing
'-' with '%-' resolves the issue.
2020-04-23 21:03:18 +02:00
kiyan42
f906cb0195 fix folder creation 2020-04-11 10:16:16 +02:00
Stephan Seitz
c3efde1f3b Bugfix: delete key would rename if set 2020-04-10 23:13:23 +02:00
kiyan42
ff860ecb49 Feature: add option for user keybindings 2020-04-03 12:19:41 +02:00
kiyan42
c003626dee make linking of default groups for tree style and add docs 2020-04-03 11:50:14 +02:00
kiyan42
658e2100eb add documentation for highlight groups 2020-03-11 12:24:11 +01:00
kiyan42
41b050a6ab Control how files are being opened 2020-03-11 12:06:42 +01:00
kiyan42
b199763856 fix not creating a new file when opening the tree window 2020-03-08 00:18:14 +01:00
kiyan42
7e3ff3db86 change icon selection 2020-03-05 11:52:32 +01:00
kiyan42
a33622179d refactoring to use config options from lua module 2020-03-04 14:58:37 +01:00
kiyan42
0b4c9d8143 add config option to disable the icons 2020-03-04 14:49:52 +01:00
kiyan42
3678169bd6 add config to open or close automatically 2020-03-04 13:15:33 +01:00
kyazdani42
03168a5155 fix tree when option is 'right' 2020-03-01 19:24:24 +01:00
kyazdani42
7483abcf40 some buffer options 2020-03-01 18:08:27 +01:00
kyazdani42
1d788f91e2 add right side check for disabled feature 2020-03-01 16:19:03 +01:00
kyazdani42
363a7b82aa add <C-t> to open file in new tab 2020-03-01 15:07:29 +01:00
kyazdani42
7ac26175f2 clear prompt with normal :<esc> and fix file creation 2020-03-01 15:00:34 +01:00
kyazdani42
c31cceaff6 fix macos 2020-02-29 09:41:34 +01:00
kyazdani42
daff837b23 add LuaTreeFindFile, doc and option 2020-02-28 17:24:08 +01:00
kyazdani42
b9398b285d Use system function instead of luv calls
- add dynamic path creation 'foo/bar/baz'
- fixes delete function
2020-02-28 15:34:02 +01:00
kyazdani42
f6e44c1726 cd to folder when doing nvim FOLDER and layout code
- when doing `nvim FOLDER` it works as expected, opening the tree
on the correct folder (updating the ROOT_PATH)
- add the code for keeping the tree window on the side no matter
what, but since the lack of window events, disable this feature.
2020-02-28 01:03:34 +01:00
kyazdani42
a6f4ec6270 change <c-[> to . to change directory path 2020-02-27 22:51:58 +01:00
kiyan42
d4a693e46b error handling for fs alteration 2020-02-23 01:28:29 +01:00
kyazdani42
e5db994ebb protect plugin against windows and prevent macos from crashing due to --ignore 2020-02-22 17:36:05 +01:00
kyazdani42
4422ebc299 remove comment as its been fixed with buffer options 2020-02-21 17:21:03 +01:00
kiyan42
b96d104c0b update some options 2020-02-21 14:23:57 +01:00
kiyan42
4d43fbd017 change folder color and lua icon color 2020-02-21 08:52:25 +01:00
kiyan42
f28dbfa998 add better doc and add user ignore list 2020-02-20 23:19:16 +01:00
kiyan42
267b14fc5f fix coloring without vim-devicons 2020-02-20 21:48:16 +01:00
kiyan42
f5af7aa95d add some options for the user and info in the readme 2020-02-20 21:16:13 +01:00
kyazdani42
1d61d6b123 properly check web dev icons 2020-02-20 20:06:30 +01:00
kyazdani42
5eaeac123b dont crash with no colors 2020-02-20 19:59:17 +01:00
kyazdani42
49b9798cbc clear vim prompt when updating the fs 2020-02-20 18:01:27 +01:00
kyazdani42
e86c857960 remove scratch winutils and use input to alter fs 2020-02-20 17:01:43 +01:00
kyazdani42
460fdf6b7a Merge branch 'master' of github.com:kyazdani42/nvim-tree.lua 2020-02-20 15:54:07 +01:00
kyazdani42
77bcb8db01 formatting 2020-02-20 15:54:01 +01:00
kyazdani42
4945789baa fix images color 2020-02-20 15:50:38 +01:00
kiyan42
55fbc471d1 fix bug on format 2020-02-20 12:18:43 +01:00
kyazdani42
6670b8e494 quit when tree is last buf, open on enter if dir or no file 2020-02-19 23:47:25 +01:00
kyazdani42
f397e1050c fix git parsing and init
- run `ls ROOT_PATH` on init to make sure we are in the right place
- match git path with `.*` to make sure we check when in a subdir
> it could cause issues though, fix this later with a better
> git interface
2020-02-19 23:01:52 +01:00
kyazdani42
3945771fb5 make code faster and cleaner in file.lua and winutils.lua 2020-02-19 19:43:03 +01:00
kyazdani42
5ab65e98b3 remove conf.lua file 2020-02-19 18:47:02 +01:00
kyazdani42
e29c9fb4ee add symlink handling 2020-02-19 18:40:10 +01:00
kyazdani42
b0d6e153f7 easier regex matching 2020-02-19 18:11:09 +01:00
kyazdani42
6d9831b2a5 color init in lua 2020-02-19 17:57:36 +01:00
kyazdani42
05b5117f75 better git format and parsing 2020-02-19 16:46:25 +01:00
kyazdani42
1c4fb795fb add git refresh 2020-02-19 14:32:33 +01:00
kyazdani42
c77a560a63 move window/buf stuff from file.lua to winutils.lua 2020-02-19 14:16:09 +01:00
kyazdani42
14f83b3891 add mouse support 2020-02-19 14:01:40 +01:00
kyazdani42
ac92bfd911 Faster git parsing
- fix a bug when removing nodes from huge dir
- only one `system` call for git status
- add relative paths to nodes
- parse git status from relative paths
2020-02-19 13:55:40 +01:00
kiyan42
1a473fb193 fix highlight for files without icons 2020-02-18 18:38:42 +01:00
kiyan42
f8fb6de9c6 add git integration 2020-02-18 18:22:05 +01:00
kiyan42
0ed31e065e refresh tree when changing fs 2020-02-18 16:06:05 +01:00
kiyan42
b448b1a0fa reorganize code 2020-02-18 15:59:53 +01:00
kiyan42
7b7fb56c4e better format 2020-02-18 14:30:32 +01:00
kyazdani42
98d94876f2 start refresh. Need to find a way to trigger the function when FS is altered 2020-02-14 17:42:07 +01:00
kyazdani42
083d2b556d add syntax highlighting 2020-02-14 16:51:33 +01:00
kyazdani42
4761e3f2a5 do not block moving around in the buffer. 2020-02-14 14:15:55 +01:00
kiyan42
3e04580e74 list dotfiles 2020-02-10 17:11:19 +01:00
kiyan42
0bb2a99f55 FS api
- change vim root and update tree
- create / rename / delete file and folders
2020-02-10 14:53:28 +01:00
kiyan42
a3c4fcc6fe adding/removing/renaming file almost done 2020-02-09 18:56:44 +01:00
kiyan42
ef6f338cce some refacto and start adding file creation/removal.. 2020-02-09 18:11:02 +01:00
kyazdani42
d649119146 small refacto 2020-02-09 15:36:18 +01:00
kyazdani42
04bd042869 update readme 2020-02-07 21:24:08 +01:00
kyazdani42
bdbebefc6d add icons and sort
- Uses vim-devicons if it exists
- Uses font awesome folder open/close
- Sort directories first
2020-02-07 20:14:13 +01:00
kiyan42
98716c9a83 small fix 2020-02-07 11:51:01 +01:00
kyazdani42
9dfc4b27ef opening files and browsing is working properly 2020-02-06 20:25:02 +01:00
kyazdani42
25df400bf3 add first draft 2020-02-05 01:07:06 +01:00
kyazdani42
90e6ce1853 window/buffer toggle works 2020-02-04 22:44:48 +01:00
kyazdani42
7ec6a588d5 init plugin 2020-02-04 19:59:14 +01:00