nvim-tree / nvim-tree/nvim-tree.lua

Rename Input Callback

Open
#1,803 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

API feature request
Dominant language
Lua
Stars
8.6k
Forks
639
Avg merge
1d 14h
Merged PRs (30d)
2

Description

#1791 adds rename_root which presents the file without the absolute path, just the file name.

This is good UX and should also be applied to rename.

This change would be a break in existing functionality, however rename_full does provide most of the existing rename experience.

Change rename-file.lua fn to apply vim.fn.fnamemodify(node.absolute_path, ":t")) before presenting input.

Update: #1791 applies sane defaults, resolving the above, as well as adding configurable rename suggestion.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in rename-file.lua at fn and review issue #1791, which the update says adds sane defaults and configurable rename suggestions. Confirm whether that change already covers the requested rename behavior; the issue is done when rename presents the intended filename suggestion without regressing rename_full.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
tooling
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.