Commit Graph

774 Commits

Author SHA1 Message Date
Kiyan
e6c1b4cd5b chore(setup): make setup idempotent (#1340)
Co-authored-by: Alexander Courtis <alex@courtis.org>
2022-06-26 12:14:03 +02:00
Alexander Courtis
0c13bd76a8 chore: update_root, sync_root_with_cwd, refactor with move_missing_val (#1359)
* chore: opts.update_focused_file.update_cwd -> update_root

* chore: opts.update_cwd -> sync_root_with_cwd

* chore: refactor options with utils move_missing_val

* chore: refactor options with utils move_missing_val

* chore: refactor options with utils move_missing_val

* chore: refactor options with utils move_missing_val

* chore: refactor options with utils move_missing_val

* chore: refactor options with utils move_missing_val
2022-06-26 12:18:14 +10:00
lixvbnet
b299a877ad fix (#1363): use change_dir.fn instead of lib.open in M.change_root 2022-06-25 14:14:08 +10:00
litao91
79258f1d67 fix: window picker can't be correctly rendered when cmdheight = 0 (#1349)
Co-authored-by: litao <litao912002@hotmail.com>
2022-06-20 08:29:47 +02:00
Alexander Courtis
6548287e8b feat: add cwd arg to open_replacing_current_buffer: retain existing valid buffer check 2022-06-20 09:52:56 +10:00
kiyan
3bc2207f4a chore: simplify get_alt_or_next_buf 2022-06-19 09:51:40 +02:00
Alexander Courtis
d9aaa2f985 fix(#1356): view.close switch_buf_if_last_buf prefers alt buf (#1357) 2022-06-19 09:51:01 +02:00
javiertury
6b7b1b34fa feat: add cwd arg to open_replacing_current_buffer (#1348) 2022-06-19 13:59:35 +10:00
Alexander Courtis
1fc0eee946 fix(#1354): add missing :hi NvimTreeFileIgnored (#1358) 2022-06-18 10:42:12 +02:00
btstream
e82a921baa fix(view): prevent buffer override when actions.open_file.quit_on_open
* fix(view): prevent open buffer on NvimTree window when actions.open_file.quit_on_open is true

* fix(view): add view.quit_on_open function to prevent open on NvimTree window

Co-authored-by: btstream <btstream@gmail.com>
2022-06-18 17:07:24 +10:00
lixvbnet
b08003f546 feat: add NvimTreeFindFile!, root_dirs and prefer_startup_root 2022-06-18 15:32:56 +10:00
kiyan
bdb6d4a254 fix(actions): reloading copy-paste logic inverted
fixes #1331
2022-06-11 11:22:45 +02:00
kylo252
1caca62854 feat(view): ability to centralize view on entering (#1310) 2022-06-07 10:09:58 +10:00
lu5je0
821f050fda feat: full-name of node in floating window (#1305) 2022-06-06 11:15:03 +02:00
Raafat Turki
3c936c7cb6 feat(trash): default command 'trash' -> 'gio trash' (#1323) 2022-06-06 11:13:37 +02:00
Alexander Courtis
f6eef4a1f0 feat(explorer): add filesystem watchers: reinstate git output logging 2022-06-06 11:19:55 +10:00
Rammiah
6f6eab14dc feat(renderer): indent_markers add a item icon (#1321) 2022-06-05 14:19:19 +02:00
Kiyan
b0d27c09b6 feat(explorer): add filesystem watchers (#1304)
* feat(explorer): add experimental watchers

This commit introduces watchers to update the tree.
This behavior is introduced behind an "filesystem_watchers" option
which should prevent instabilities.
It will become the default at some point.

Co-authored-by: Alexander Courtis <alex@courtis.org>
2022-06-05 12:39:39 +02:00
kiyan
25921aa87a fix(open-file): do not open file when target winid is nil 2022-06-04 14:06:35 +02:00
kiyan
92ed3c487a fix(view): call get size after setting the height
fixes bottom and top placement for the tree
fixes #1311
2022-06-04 11:56:03 +02:00
kiyan
a0f705995a fix(view): grow condition for left or right was always true for right 2022-05-31 20:25:13 +02:00
Kiyan
2002b21be7 feat(resize): add ability to grow and shrink the tree when drawing (#1293)
Will adapt the view size based on the longest line.
fixes #865
2022-05-31 09:05:00 +02:00
kiyan
6b26628acf fix(preview): open file in preview should delete buffer when hidden
fixes #1307
2022-05-30 18:59:43 +02:00
Alexander Courtis
b1ecb75a6c feat: guard against multiple setup calls (#1308) 2022-05-30 12:46:56 +02:00
Alexander Courtis
8198fa01fc doc: default mappings 2022-05-30 12:53:28 +10:00
kiyan
5e900c2f29 refacto: tree explorer root should be absolute_path not cwd 2022-05-29 11:40:06 +02:00
emmanueltouzery
3806653d75 new option: close windows displaying removed files (#1300) 2022-05-29 11:23:01 +02:00
Kiyan
3a95c5a9cf feat(actions): expand all under folder (#1292) 2022-05-29 11:15:32 +02:00
Alexander Courtis
0373680819 #1301 nvim uses LuaJIT 2.1 -> lua 5.1 2022-05-29 12:29:40 +10:00
Alexander Courtis
c3b7be8d19 add .luarc.json for lua-language-server and fix a couple of nits (#1296) 2022-05-28 11:16:54 +02:00
Alexander Courtis
3ba383d591 chore/remove globals (#1279)
* remove renderer globals: nvim_tree_add_trailing nvim_tree_highlight_opened_files nvim_tree_root_folder_modifier nvim_tree_special_files

* remove renderer globals: nvim_tree_icon_padding

* remove renderer globals: nvim_tree_symlink_arrow

* remove renderer globals: nvim_tree_show_icons, nvim_tree_show_icons

* remove renderer globals: nvim_tree_git_hl

* remove renderer globals: nvim_tree_group_empty

* remove renderer globals: respect_buf_cwd

* remove renderer globals: nvim_tree_create_in_closed_folder

* remove globals: consistency in legacy checks

* remove renderer globals: nvim_tree_special_files

* renderer.icons.symbols -> glyphs
2022-05-28 11:08:40 +10:00
bstaint
6abc87b1d9 feat: msys2 git support (#1295) 2022-05-26 15:22:42 +02:00
kiyan
540c811cb2 fix(open file): do not trigger buf enter event when setting target win
Fixes #1288
Also starts a refactoring of the open-file code, to make it easier to
debug and improve.
2022-05-26 13:37:50 +02:00
Taxo Rubio
b2ba6dea71 feat: optional path argument for NvimTreeToggle and NvimTreeFindFileToggle (#1276) 2022-05-21 13:31:14 +02:00
kiyan
73ab312820 refactor: simplify opening file in new tab
fixes #1271. Also fixes opening a file in new tab when close_on_open was
true.

This introduces breaking change since we don't do any extra behavior
and let the buffer be opened by the tree.
The previous behavior was a bit old and i believe this should've been
fixed by now.
Reference this commit if unexpected behavior appears while opening files
in new tabs from nvim-tree.
2022-05-21 12:09:09 +02:00
kiyan
9d6f4c184b chore: remove custom set local implementation
Seems vim.opt_local has been fixed.
see https://github.com/neovim/neovim/issues/14670
2022-05-21 11:36:07 +02:00
kiyan
17d5bd64e8 chore(config): auto resize the tree by default when opening a file.
config.open_file.auto_resize is now true by default.
Breaking change for default configurations.
See https://github.com/kyazdani42/nvim-tree.lua/issues/1275#issuecomment-1133515999
2022-05-21 11:27:49 +02:00
Michael
9563a11ce0 feat: reload explorer on buf enter (#1265) 2022-05-17 10:04:08 +02:00
Kiyan
6343813a35 feat(live-filter): add ability to live filter out nodes in the tree (#1056) 2022-05-17 10:03:49 +02:00
kiyan
9d26594b6c fix(renderer): empty space at end of line
fixes #1253
2022-05-15 10:28:17 +02:00
kiyan
7293f8dc70 fix(renderer): padding when git icons are after the name
fixes #1253
2022-05-14 13:41:58 +02:00
kiyan
d88d12f5bc Revert "#1253 only pad git icons when they are present (#1259)"
This reverts commit 90d7b8edb1.
fixes #1267
2022-05-14 13:31:37 +02:00
muro3r
aefa66c04d feat: extension sorter (#1181) (#1264) 2022-05-14 10:54:01 +02:00
Kiyan
f8312cd06f feat(renderer): add ability to set git icons in signcolumn (#1242) 2022-05-14 09:54:27 +02:00
Michael
46014449b6 refactor: use lua api for user commands and autocommands (#1206)
BREAKING: plugin now requires nvim-0.7
2022-05-14 09:49:45 +02:00
Alexander Courtis
90d7b8edb1 #1253 only pad git icons when they are present (#1259) 2022-05-14 09:35:44 +02:00
Alexander Courtis
f85af83f13 #1217 show git status for link targets, when no status on the link itself (#1263) 2022-05-14 09:34:53 +02:00
Alexander Courtis
82ec79aac5 #1216 show diagnostic signs on all folders (#1244) 2022-05-10 11:22:11 +10:00
kiyan
82a646225f fix(parent node): do not close folder when should_close is false 2022-05-08 13:30:57 +02:00
Alexander Courtis
a448e66dde #1216 respond to CocDiagnosticChange (#1243) 2022-05-08 11:41:20 +02:00