Closed
Description
nvim-tree.lua/lua/nvim-tree/actions/fs/rename-file.lua
Lines 23 to 40 in aaee4cd
Describe the solution you'd like
The e
and r
don't respect git repo: by renaming something we loose track of file path history. I would like to be able to rename filepath by using git mv
(instead of system command) in order to keep track of file renames:
git mv <src_path> <dst_path>
Currently, nvim-tree
doesn't provide this feature forcing me to rename file by using git manually.
Describe alternatives you've considered
Running !git mv % <path_no_new_name>
is rather clunky...
Running !git -A <path_no_new_name>
is rather clunky and not something I want...
Can this functionality be implemented utilising API?
NO.
Additional context
I'ts difficult to easily contribute API feature, cause:
- The runner is not a generic lua wrapper for git:
- it's hard-wired to run only single git subcommand:
status
- quite intricate interally - it's hard to extend
- no docs/comments
- This repo has no dedicated
git
wrapper for running & handling git output (there is a dedicated fast libgit2 lua bindings btw) - Intent of
nvim-tree.git
is unclear