Skip to content

feat: add feature to download from url when p from register#3339

Open
Uanela wants to merge 32 commits into
masterfrom
feat/add-download-from-path
Open

feat: add feature to download from url when p from register#3339
Uanela wants to merge 32 commits into
masterfrom
feat/add-download-from-path

Conversation

@Uanela

@Uanela Uanela commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

Depends on #3336

Summary

This PR simply takes #3336 one step further and allows downloading files directly to nvim when it finds URL on the register on p.

  • There is no edge case that I've just forgotten what was is it and not quite sure if it is real a problem (may I'll update if I remember it)
  • It only works when the text starts with http I don't if should support other protocols. btw passing an url that doens't start with http will be treated as a folder because my folder/file can be github.com/user/some-blog.png which is also a valid link on http context.

Context: #3336 (comment)

Uanela and others added 30 commits June 11, 2026 10:07
@Uanela Uanela requested review from alex-courtis and gegoune June 18, 2026 09:20

@gegoune gegoune left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't following recent discussions too closely, got one question: why do we want nvim-tree to handle fetching files over http?

Comment thread lua/nvim-tree/actions/fs/clipboard.lua Outdated
Co-authored-by: gegoune <69750637+gegoune@users.noreply.github.com>
@Uanela

Uanela commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator Author

I wasn't following recent discussions too closely, got one question: why do we want nvim-tree to handle fetching files over http?

I read this through my phones notification bar and it sounded like whey do we need cars to fly, rsrsrsrs.

This PR as more to do with #3336 and is basically a one tiny addition to allow download files, WHY? On #3336 I added a feature to allow c and p between different nvim-tree instances this discussion was undergoing at #1549, as the feature simply copies the absolute path(s) and pastes into another instance and nvim-tree deals with it and make copy/cut an horizon of possibilites were opened:

1 - Copy/Cut files from anywhere on the OS as far as you got the absolute path, I can go to finder/explorer simply grab the absolute path and go paste into nvim-tree
2 - Most of the time when download something to a project (image, audio, video, etc) you download it to your OS explorer then copy to your IDE (and on vim we basically can't), then I thought why do I need to download first and copy to my project why not simply download directly to my project then this PR feature came along just grab the link and p on nvim-tree and it will download it.

Fix is_nodes_array function to correctly identify node arrays.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants