nvim-tree.lua/lua/nvim-tree
Ian Homer 949913f186
feat(api): rename_basename API and action (#1791)
* relative rename action

* 🔥 remove debug print statement

* 🐛 better handling of dot files

Also pickout extension in filename with more one dot

* 🔧 keymap e for relative-rename action

* 📝 update help with relative-rename mapping

*  add API for rename_relative

* 🚨 correct lint warnings

* rename_relative -> rename_root

* stylua

* ♻️ use fnamemodify instead of custom logic

* 💥 refactor renaming api using vim filename modifiers

Rename API now supports filename modifiers as arguments, although
only with limited support of options. The function signature however
will allow improvements going forward. The API signature is backward
compatible, although the behviour has changed as per the next comment.

This change changes the default behaviour of the renames, rename_full is
what rename was, rename now just renames the tail (i.e. the filename)

* 🐛 make api rename, without args, functional

*  allow modifier argument to be used in API call

* 📝 update documentation with new command name

* rename-file.fn takes only a modifier as argument

* add Api.fs.rename_basename, specify modifiers for rename, rename_sub

* add Api.fs.rename_node

* rename-file tidy allowed modifiers

* 🐛 fix bugs after last refactoring

rename ":t" and ":t:r" was moving file to root of project and not
maintaining sub-directory

* 🐛 correct absolute rename

which was loosing sub-directory on rename

* 🔥 remove debug print statements

* stylua

Co-authored-by: Alexander Courtis <alex@courtis.org>
2022-12-16 13:32:48 +11:00
..
actions feat(api): rename_basename API and action (#1791) 2022-12-16 13:32:48 +11:00
explorer fix(#549): add more profiling ~tree init 2022-12-16 12:12:06 +11:00
git fix(watcher): only purge on subsequent setup calls, add git_purge log 2022-12-16 11:47:50 +11:00
iterators feat(bookmarks): add bookmark feature (#1412) 2022-07-11 10:00:12 +02:00
marks feat(notify): add notify.threshold (#1693) 2022-11-01 10:24:40 +11:00
renderer feat(view): add filters.git_clean, filters.no_buffer (#1784) 2022-12-10 15:55:33 +11:00
api.lua feat(api): rename_basename API and action (#1791) 2022-12-16 13:32:48 +11:00
colors.lua feat(renderer): add NvimTreeOpenedFolderIcon NvimTreeClosedFolderIcon (#1768) 2022-11-28 11:17:09 +11:00
config.lua fix(keypress): use <cmd> instead of : to avoid triggering CmdLineEnter 2022-07-14 09:33:19 +02:00
core.lua fix(#549): add more profiling ~tree init 2022-12-16 12:12:06 +11:00
diagnostics.lua feat: add diagnostics.show_on_open_dirs git.show_on_open_dirs (#1778) 2022-11-29 11:12:34 +11:00
events.lua feat(event): add WillRenameNode (#1821) 2022-12-12 11:56:50 +11:00
keymap.lua fix: inverted diagnostic navigation keymaps 2022-08-20 14:40:09 +10:00
legacy.lua remove legacy g: option migration 2022-12-12 09:50:52 +11:00
lib.lua feat(api): add api.tree.get_nodes 2022-11-19 15:54:16 +11:00
live-filter.lua fix: replace vim.* "requires" with explicit calls to vim functions (#1701) 2022-11-06 10:37:33 +11:00
log.lua fix(notify): log file notice info->debug 2022-11-20 12:26:59 +11:00
notify.lua fix(notify): remove unused varargs, log file notice debug->info 2022-11-19 14:34:39 +11:00
utils.lua feat(tabs): add tab.sync options (#1698) 2022-11-19 13:57:45 +11:00
view.lua fix(#549): add more profiling ~tree init 2022-12-16 12:12:06 +11:00
watcher.lua fix(#1720): .git watch only FETCH_HEAD, HEAD, HEAD.lock, config, index (#1732) 2022-11-12 14:38:33 +11:00