zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
39.96k stars 2.08k forks source link

Cannot open new project from Zed #11089

Open bluthej opened 2 months ago

bluthej commented 2 months ago

Check for existing issues

Describe the bug / provide steps to reproduce it

When I run "workspace: open" (Ctrl + O) nothing happens. The only way I found to open a project is to cd into it and launch Zed from the terminal.

Environment

Zed: v1.0.0 (Zed) OS: Linux 1.0.0 Memory: 15 GiB Architecture: x86_64

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

I looked at the log but there is no entry related to this, when I do "workspace: open" nothing pops up in the log.

apricotbucket28 commented 2 months ago

Do you have a desktop portal capable of showing a file chooser installed? For reference: https://wiki.archlinux.org/title/XDG_Desktop_Portal#List_of_backends_and_interfaces

bluthej commented 2 months ago

Waow I have to admit I knew nothing about this.

I'm on hyprland and indeed I needed to install something like the gtk portal to handle file opening.

Thanks for the tip and sorry for an opening an issue that had nothing to do with Zed!

apricotbucket28 commented 2 months ago

This is going to be a common issue mostly for people using tiling WMs. It should probably be mentioned in a Linux FAQ once we get preview builds :)

paulcarroty commented 2 months ago

Got the same problem on Sway and think Zed should give a warning window about portals.

nixpulvis commented 2 months ago

Also having this problem on Sway. Here's the log line from the event mixed in with a bunch of 2024-05-06T13:47:52-04:00 INFO zbus::connection::socket_reader lines:

[2024-05-06T13:47:52-04:00 DEBUG zbus::proxy] Failed to get owner of org.freedesktop.portal.Desktop: org.freedesktop.DBus.Error.NameHasNoOwner: The name does not have an owner

This message appears twice per open project event.

MartijnDekkers commented 1 month ago

Same issue on Windows. CTRL-o doesn't do anything, neither does opening a new instance, or running from a different directory. there is no "new project" command either. The project I selected when I first ran zed is "The Project"

paulcarroty commented 1 month ago

On Linux & Sway I fixed this with vifm and xdg-desktop-portal-termfilechooser.

tingerrr commented 5 days ago

I ran into a similar issue on hyprland, I have both xdg-desktop-portal-hyprland and xdg-desktop-portal-kde installed. When I run hyprland itself, i.e. from a tty or from sddm for example, I will not get any opening window dialogue. I tried a few other backends and those didn't seem to work for me.

However, when I start KDE plasma and open hyprland from a different tty, the opening dialogue appears, but on the plasma session, not the hyprland session.

I'm unsure if this is related to the interactions of plasma and hyprland running at the same time, but I figured I'd report it anyway.

Perfectio07 commented 4 days ago

I want to put my input here. If not for this issue I would not have been able to open a new project. I also run Hyprland and while I had xdg-desktop-portal-hyprland I was missing a backend that had a file chooser. I was able to install xdg-desktop-portal-gtk and after setting it as a fallback, all is good now. I agree that there probably should be some FAQ somewhere about this.

Giuliano1993 commented 3 days ago

I think it has something to do with the shortcuts system linked with the vim ones! I have the same issue on windows, but I noticed that if I press ctrl + O while I'm in insert mode then the combination triggers.

this is from assets/keymaps/vim.json

      "ctrl-o": "pane::GoBack",

and this Is from assets/keymaps/default-linux.json

      "ctrl-o": "workspace::Open",

While when it's not activated and you're in normal mode, zed expects to receive other keys after ctrl so it doesn't catch that input.

I feel this thing Is actually at the base of also some other interaction and shortcuts issues I'm facing