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
50.09k stars 3.07k forks source link

'Find All References' and 'Rename Symbol" commands doesn't work in Svelte components #7772

Open shadow-identity opened 9 months ago

shadow-identity commented 9 months ago

Check for existing issues

Describe the bug / provide steps to reproduce it

  1. Create a lib/foo.ts file:

    export const foo = 'foo'
  2. Create a svelte component:

    <script lang="ts">
    import { foo } from '$lib/foo'
    console.log(foo)
    </script>
  3. Go to lib/foo.ts, right-click on foo definition, select "find all references". -> It does not show that it used in the svelte component.

  4. right-click on foo definition, select "Rename Symbol", rename it. -> The constant is renamed, but the import and usage in the svelte component is not updated, pointing to an old name.

Environment

Zed: v0.121.7 (Zed) -> still reproducible on 0.152.4 OS: macOS 14.3.1 -> same on 15 Memory: 16 GiB Architecture: x86_64 -> same on M3

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.

If you only need the most recent lines, you can run the zed: open log command palette action to see the last 1000.

2024-02-14T14:06:43+01:00 [INFO] completion out of expected range
... dozens of them...
2024-02-14T14:06:43+01:00 [ERROR] crates/project/src/project.rs:4861: Request completionItem/resolve failed with message: Cannot read properties of undefined (reading 'file')
...dozens of them...
2024-02-14T14:08:17+01:00 [ERROR] Have not found plugin path for "prettier-plugin-tailwindcss" inside "/Users/pnedrigailov/workspace/location-insights/frontend/dashboard/node_modules"
...dozens of them...
github-actions[bot] commented 1 month ago

Hi there! 👋 We're working to clean up our issue tracker by closing older issues that might not be relevant anymore. Are you able to reproduce this issue in the latest version of Zed? If so, please let us know by commenting on this issue and we will keep it open; otherwise, we'll close it in a week. Feel free to open a new issue if you're seeing this message after the issue has been closed. Thanks for your help!

shadow-identity commented 1 month ago

Still reproducible on Zed 0.152.4, Mac OS is now 15

eulertour commented 1 month ago

I also ended up here after having no idea why this wasn't working