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
46.63k stars 2.65k forks source link

Go to definition not working again in .svelte files #13769

Closed anthonyivol closed 2 weeks ago

anthonyivol commented 2 months ago

Check for existing issues

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 commented 2 months ago

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 commented 1 month ago

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

secondl1ght commented 1 month ago

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.

phillx commented 1 month ago

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 ) 🥲

lucabrini commented 3 weeks ago

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)

Gioppix commented 3 weeks ago

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

bienoubien-studio commented 2 weeks ago

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

AlbertMarashi commented 2 weeks ago

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

AlexandreOrlg commented 2 weeks ago

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

Kae7in commented 2 weeks ago

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

oleksify commented 2 weeks ago

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
      }
    },
  }
code-yeongyu commented 2 weeks ago

Guess the same issue as #16619?

SomeoneToIgnore commented 2 weeks ago

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.

AlbertMarashi commented 1 week ago

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
            }
        }
    }