lapce / lapce

Lightning-fast and Powerful Code Editor written in Rust
http://lapce.dev
Apache License 2.0
34.46k stars 1.03k forks source link

Ability to drop files into the editor #1181

Open sokorototo opened 2 years ago

sokorototo commented 2 years ago

Is your feature request related to a problem? Please describe.

Say I have the editor open and I see a file in my file manager I want to quickly open. I try dragging and dropping into the editor, no dice.

Describe the solution you'd like

It's quite simple: open a new editor for the dropped file; if the file lives in the current workspace/folder, behave as though it was opened via the Side Bar.

Describe alternatives you've considered

lapce could open a small dialogue asking whether the user trusts the given file. Also whether to enable advanced editor features like LSP.

Additional context

None, I just like lapce

Jieiku commented 2 years ago

I was about to open the same feature request. This is how I previously used Atom, and how I currently use Kate. (for some files)

Really looking forward to using Lapce full time once it is fleshed out a bit more, love how fast the editor is!

codecat commented 1 year ago

Additionally, the ability to drag and drop entire folders to make Lapce open the folder.

spartanatreyu commented 8 months ago

If Lapce supports multiple panes, what should happen when dragging-and-dropping:

  1. Dropping a file anywhere onto a pane should open the file in that pane.
  2. Dropping a file near the center of a pane should open the file in that pane, but dropping a file near an edge of a pane should split the pane and put the dropped file into the new pane.
tinyaustralia commented 3 months ago

Such basic functionality which makes me sad as I love Lapce otherwise. No drag/drop support anywhere and this has been a longstanding request from the community. Back to VS code I guess.

jm-observer commented 3 months ago

I am also very sad. As you can see, there are too few developers now, and many basic functions are missing. I can only slowly make up for it.

rschiang commented 3 months ago

@tinyaustralia I think we should all cherish open source project developers more. As you could see, for the longstanding request from the community to really happen, either someone funds staff to work on the project, or some of the community members actually contribute code.

The way Lapce implements its cross-platform UI makes this a hassle to achieve, as you’ll need to actually get Druid to implement the API reliably across different platforms. I’d suggest starting from there.

panekj commented 3 months ago

The way Lapce implements its cross-platform UI makes this a hassle to achieve, as you’ll need to actually get Druid to implement the API reliably across different platforms. I’d suggest starting from there.

Slightly off-topic, but since the issue was opened we replaced Druid (since it was deprecated) with our own GUI toolkit.

rschiang commented 3 months ago

@panekj Ah thanks! Haven’t digged into the UI stack for a while. Will definitely look what can be done in Floem!

dzhou121 commented 3 months ago

should be implemented now in latest v0.4.1

tinyaustralia commented 3 months ago

should be implemented now in latest v0.4.1

What a nice surprise! Thank you.

dzhou121 commented 3 months ago

should be implemented now in latest v0.4.1

What a nice surprise! Thank you.

You have @jm-observer to thank who implemented this feature among a lot of other new features.