nvim-tree / nvim-tree/nvim-tree.lua
Allow `api.fs...` to take a path as input
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 8.6k
- Forks
- 639
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 2
Description
Instead of having to prompt the user to enter a filename after invoking api.fs.create, it would be nice if we could do something like this:
require('nvim-tree.api').fs.create('/path/to/file')
(If no input is passed, then prompt to enter filename.)
And the same for api.fs.paste.
A really good use case for this would be a user-friendly action for file duplication, which is a pretty common action.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the Lua implementations of nvim-tree.api.fs.create and api.fs.paste. Read how each currently prompts for a filename, then verify the behavior for an explicit path and for no input. Done means both APIs accept a path while preserving the existing prompt behavior when no path is provided.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua, neovim
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 50/100