zed icon indicating copy to clipboard operation
zed copied to clipboard

Go to definition not working again in .svelte files

Open anthonyivol opened this issue 1 year ago • 9 comments

Check for existing issues

  • [X] Completed

Describe the bug / provide steps to reproduce it

Go to definition not working in .svelte files

Environment

Zed: v0.141.3 (Zed) OS: macOS 14.4.1 Memory: 8 GiB Architecture: aarch64

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.

Zed.log

[Zed.log](https://github.com/user-attachments/files/16081147/Zed.log)

anthonyivol avatar Jul 03 '24 08:07 anthonyivol

It seems that the Snippet extension was causing this, so it is related to https://github.com/zed-industries/zed/issues/13282 Uninstalling the Snippet extension fixed the issue. That said both features were working well together until yesterday, and I can't say which update of what broke that harmony...

anthonyivol avatar Jul 03 '24 12:07 anthonyivol

Edit : without the snippet extension go to definition now worked, but autocompletion and auto-import doesn't at all in script tag.

anthonyivol avatar Jul 11 '24 08:07 anthonyivol

Go to Definition and Hover Documentation is not working for me in .svelte files either. I do not have the Snippet ext. only the Svelte one.

secondl1ght avatar Jul 13 '24 02:07 secondl1ght

Edit : without the snippet extension go to definition now worked, but autocompletion and auto-import doesn't at all in script tag.

Can confirm the issue went away after uninstalling snippet extension ( Zed 0.146.5, Linux ) 🥲

phillx avatar Aug 02 '24 21:08 phillx

Go to Definition and Hover Documentation is not working for me in .svelte files either. I do not have the Snippet ext. only the Svelte one.

+1 (Zed 0.148.1, macOS x86)

lucabrini avatar Aug 17 '24 16:08 lucabrini

+1, not working for me either. No snippet extension

Gioppix avatar Aug 18 '24 09:08 Gioppix

Update : Go to definition works correctly after Zed 0.147.2 update, but fail after 0.148

bienbiendev avatar Aug 19 '24 07:08 bienbiendev

Also getting this issue, using Svelte 5 and on MacOS Zed 0.149.3

AlbertMarashi avatar Aug 20 '24 20:08 AlbertMarashi

I’m experiencing the same issue with Svelte 4 on MacOS Sonoma, running Zed version 0.149.3

AlexandreOrlg avatar Aug 21 '24 11:08 AlexandreOrlg

Go to definition has completely stopped working for me in .svelte files in this most release of Zed 0.149.3.

Kae7in avatar Aug 22 '24 03:08 Kae7in

This is what helped me bring it back - I added svelte-language-server to languages section in settings and it worked.

"languages": {
    "Svelte": {
      "formatter": "language_server",
      "language_servers": ["svelte-language-server"],
      "prettier": {
        "allowed": true
      }
    },
  }

oleksify avatar Aug 22 '24 04:08 oleksify

Guess the same issue as #16619?

code-yeongyu avatar Aug 22 '24 05:08 code-yeongyu

I have something that looks like a fix, waiting for the review/confirmation: https://github.com/zed-industries/zed/pull/16654

Meanwhile, using

"languages": {
    "Svelte": {
      // this is a new line
      "language_servers": ["svelte-language-server", "..."],
      "prettier": {
        "allowed": true,
        "plugins": ["prettier-plugin-svelte"]
      }
    },
}

could help as a workaround.

SomeoneToIgnore avatar Aug 22 '24 08:08 SomeoneToIgnore

For those just using typescript and eslint, here's a config that worked for me with the new update

    "languages": {
        "Svelte": {
            "prettier": {
                "allowed": true
            },
            "format_on_save": "prettier",
            "code_actions_on_format": {
                "source.fixAll.eslint": true
            }
        }
    }

AlbertMarashi avatar Aug 27 '24 06:08 AlbertMarashi