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
48.69k stars 2.92k forks source link

Project URLs in hover popovers are opened in the platform's file:// url handler #18641

Open vitallium opened 2 weeks ago

vitallium commented 2 weeks ago

Check for existing issues

Describe the bug / provide steps to reproduce it

  1. Install ruby-lsp gem with gem install ruby-lsp
  2. Install the Ruby extension for Zed
  3. Open any Ruby project and open it in Zed, e.g. https://github.com/vitallium/stimulus-lsp-error-zed
  4. Ensure that ruby-lsp is up and running
  5. Go to application_record.rb file and hover over OrderableByTimestamp word
  6. You should see the hover with type information and a link to the file where this type is defined.
  7. If you click on it, Zed will open a default platform handler. I am on macOS, so it opens XCode with this file.

I expect to get this file opened in Zed.

Environment

Zed: v0.155.2 (Zed Preview) OS: macOS 14.7.0 Memory: 32 GiB Architecture: aarch64

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

https://github.com/user-attachments/assets/691807fb-787e-4baa-8aa7-3a0fc3621ddd

If applicable, attach your Zed.log file to this issue.

Not applicable.

notpeter commented 2 weeks ago

I can reproduce. Likely Zed should handle file:// urls as a file navigation and open the file in Zed rather than calling out the OS to find the default handler for that file extension.