Mauricio Poppe
8340753e26
Preserve cursor position across redraws ( #1132 )
2022-04-03 14:23:07 +02:00
kiyan
1831417f05
refacto: add get_nodes_starting_line core util
2022-03-26 14:46:44 +01:00
kiyan
471afc13fe
refacto: abstract TreeExplorer in core.lua
2022-03-09 22:01:54 +01:00
Kiyan
0816064a8b
chore: add stylua to format the codebase, and run on CI ( #1055 )
2022-03-06 17:33:30 +01:00
Alexander Courtis
ce3604d33c
#972 bug: prev_git_item with hijack_cursor selects icon instead of previous file ( #1025 )
2022-02-28 21:31:23 +01:00
kiyan
f977e5c05a
refacto: make git module interface to wait for job to finish
...
allows simplify the explore/reload/find/initialization by making the
whole code synchronous. No more callback needed.
2022-02-21 19:12:16 +01:00
kiyan
58b81ed9e6
refacto: remove rendering from lib.init
2022-02-20 23:01:25 +01:00
kiyan
e1c6a575c0
fix: wait for init to finish before finding file
...
fixes #1003
2022-02-20 22:20:23 +01:00
kiyan
83f398ee8f
fix: opening tree
...
opening the tree checks bufname is directory properly and do not render
before initializing when tree is nil.
2022-02-20 21:48:46 +01:00
kiyan
209bc3d2ef
fix: properly manage directory and unnamed buffers hijacking
2022-02-20 20:04:05 +01:00
Alexander Courtis
a1937ca079
1007 do not wipe modified buffers when hijack unnamed buffer when opening ( #1009 )
2022-02-20 10:41:47 +01:00
kiyan
e8ecfbf95f
fix: do not hijack unnamed buffer when opening manually
2022-02-17 13:23:08 +01:00
kiyan
f7a6ddb720
fix: do not hijack dashboard window during open
...
fixes #983
2022-02-16 21:10:28 +01:00
kiyan
76d4ed5d77
feat: add ability to not hijack the unnamed buffer
2022-02-16 21:00:28 +01:00
Kiyan
6da7467944
refacto: buffer management, setup fixes, autocmd fixes ( #967 )
2022-02-14 19:16:45 +01:00
kiyan
0f7da146bf
chore: add guards to prepare setup refactoring
2022-02-11 11:06:11 +01:00
eightpigs
c226eaf0bf
fix: bufnr is nil when incomplete setup. ( #955 )
...
fixes #947
2022-02-10 19:07:59 +01:00
kiyan
ea92e7bf7c
refacto: set tree explorer in the global state
...
also remove the redraw method and use renderer.draw immediately
2022-02-07 22:07:08 +01:00
kiyan
47ccc2913f
refacto: move toggle help and filter toggles into actions
...
also fix explorer to properly remove element on update when filter is
applied
2022-02-07 20:43:24 +01:00
kiyan
923e034668
refacto: sort actions declaration, remove close from main file
...
fixes #921
- use view.close instead of nvim-tree.close
- put preview code inside the execution logic on keypress
- sort keys in keypress_funcs
- remove empty buffer when hijacking window
2022-02-06 19:25:23 +01:00
kiyan
8a6c7bae3a
refacto: move code ton explorer and simplify some internal apis
2022-02-06 17:58:24 +01:00
kiyan
8b27fd4e61
refacto: move target_winid outside of tree
2022-02-06 17:03:23 +01:00
kiyan
7829d7c7cf
refacto: move set_index_and_redraw -> actions.find-file.fn
2022-02-06 16:32:44 +01:00
kiyan
23c95a674f
chore: move refresh/reloaders into actions.reloaders
2022-02-06 16:24:14 +01:00
Munif Tanjim
7b64075bdf
fix: close_node ( #931 )
2022-02-05 23:09:50 +01:00
kiyan
4a9e53143b
refacto: ubiquitous language renaming
...
BREAKING
- rename all 'entry' to 'node' or '_node' if shadowing
- rename all 'entries' to 'nodes'
2022-02-05 18:10:09 +01:00
kiyan
10b4a97f7f
fix: check type callback is function in refresh
...
fixes #930
2022-02-05 17:51:18 +01:00
kiyan
f74dd24c58
refacto: move some code into actions
...
(non breaking, old assignments link to new assignments)
- move lib.collapse-all into actions/collapse-all
- move lib.dir-up into actions/dir-up
- move lib.change-dir into actions/change-dir
- use setup option for change-dir global (and use the old option for
setup)
2022-02-05 17:42:40 +01:00
kiyan
8c4fd519b6
chore(refacto): move parent and sibling functions into actions
...
BREAKING CHANGE:
- move parent_node and sibling functions from lib to
actions/movements.lua.
2022-02-05 17:08:11 +01:00
kiyan
96650c801f
BREAKING: rename populate -> explorer
...
- rename populate.lua to explorer.lua
- rename refresh_entries to refresh in explorer.lua
- rename populate to explore in explorer.lua
2022-02-05 16:56:42 +01:00
kiyan
192b2266f7
fix: synchronous file creation
...
allows cursor to be set when finishing
fixes #806
2022-02-05 13:01:37 +01:00
Lopi-py
99d65afd6e
fix: update diagnostic icon when a node is closed
2022-02-01 09:17:09 +01:00
Pavel
0bc8258529
fix: parent_node offset when hide_root_folder is true ( #912 )
2022-01-31 09:17:40 +01:00
Sander van Harmelen
1ac3502290
Add a config option to use :cd instead of :lcd ( #874 )
...
Fixes #829
2022-01-21 12:29:30 +01:00
kiyan
4d22f9487d
refacto: move open-file to actions
...
move all logic to open file from lib to actions/open-file
2022-01-21 12:01:17 +01:00
kiyan
0a2f6b0b6b
fix(dirchange): do not change dir when switching windows
...
- Avoid changing dir when switching windows, except when
changing tabpage.
- Load nvim-tree with passed directory when opening with `nvim DIR`
Fixes #858 #720
2021-12-24 14:50:20 +01:00
Sergey Kuznetsov
fd87c240df
Fix redrawing tree when not inside git repo ( #836 )
2021-12-12 12:25:15 +01:00
eightpigs
e84828806c
fix: NvimTree does not open the file when it is open standalone ( #815 )
2021-12-05 22:32:08 +01:00
Munif Tanjim
97f0039149
fix: close_node behavior on file ( #799 )
2021-11-28 14:14:42 +01:00
Kiyan
6662b60a2b
feat/chore: rewrite git with job and some other fixes ( #743 )
...
* feat/chore: rewrite git with job and some other fixes
* fix: fs clear window, rename echo_warning -> warn
also fix renaming and add an event blocker to avoid running many events
at the same time
2021-11-27 16:02:54 +01:00
kiyan
a6c1d45dd6
chore: refacto populate filtering
...
move `nvim_tree_ignore` and `nvim_tree_hide_dotfiles` to setup
2021-10-30 12:25:09 +02:00
M.A
fd3969ec98
feat: add hide_root_folder ( #728 )
2021-10-24 16:48:57 +02:00
Yehya Elmasry
5014f59585
Fix tree refreshing logic ( #739 )
2021-10-23 15:35:46 +02:00
Justin
9f90be7b67
fix: escape directory name before cd-ing ( #725 )
2021-10-16 17:43:22 +02:00
kiyan
86e6dc627e
chore: move help rendering in its own file
2021-10-10 11:48:02 +02:00
kiyan
a51795946e
fix: remove change_dir window event check
...
fixes #673 . Not sure why this check was added in the first place, but
some testing made me realize maybe it wasn't useful.
2021-10-09 10:54:43 +02:00
kiyan
618286b726
fix: get_node_at_line for group nodes
2021-10-08 20:01:09 +02:00
kiyan
fb32f35d7f
chore: allow configuring height
...
also fixes window management for top and bottom tree side
2021-10-03 14:13:10 +02:00
kiyan
8fe2b547ac
feat: add lib.collapse_all function
2021-10-03 12:58:08 +02:00
kiyan
8dbba0c2c9
fix: avoid running the buf respect cwd on every open
2021-10-02 13:13:55 +02:00