Closed MatthiasGrandl closed 1 month ago
Encountering the same issue using 0.96.2
.
After a bit of preliminary digging, this seems like a problem within the svelte-language-server
itself (https://github.com/sveltejs/language-tools/issues/550).
It seems as though the svelte-vscode
plugin that uses the language server has an additional option to allow loading the plugin, which supposedly fixes this.
I tried fiddling around with the Zed lsp
settings to see if I could load the plugin, but to no avail.
The following is my hypothesis, although the lsp side of things is far outside my expertise, so I am prepared to be told otherwise:
As svelte
files use the svelte-language-server
instead of the typescript-language-server
in Zed, you can't make use of the plugins
option within the ts language server and it doesn't seem as though the svelte one exposes any similar initialisation option that could be hooked into through Zed?
Further to the above, it seems as though svelte-language-server
might support passing typescript language server configuration/options, that could presumably be passed via the "lsp" setting in Zed?
The language server also accepts configuration for Emmet (key: emmet; settings reference), Prettier (key: prettier), CSS (key: css / less / scss; settings reference) and TypeScript (keys: javascript and typescript for JS/TS config; settings reference).
After a few different attempts/configrations though, I still can't get it to load the plugin.
These lines in the svelte-language-server
seem most of interest:
https://github.com/sveltejs/language-tools/blob/master/packages/language-server/src/server.ts#L130
Thanks for the links @chrisbrown-io. Unfortunately, it looks like all of the behavior you're referencing is implemented at the VSCode plugin level, instead of in either of the relevant LSPs. We currently don't have the bandwidth to implement these kinds of cross-language one-off patches so it might be a bit before we can get to this :)
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!
This issue was closed due to inactivity; feel free to open a new issue if you're still experiencing this problem!
Check for existing issues
Describe the bug / provide steps to reproduce it
Just tried out the preview channel for the Svelte support. So far things are working mostly fine, however when I add a new export to an existing file and then try to import this new export in an open
.svelte
file, it says "file has no exported members.To reproduce:
Create 2 files:
save the files and keep the buffers open. Then add another export to
exports.ts
Now when you try to add the import for
bar
intest.svelte
you will see the error:Module './export.ts' has no exported member 'bar'
.Environment
Zed: v0.96.2 (preview) OS: macOS 13.4.1 Memory: 16 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.If you only need the most recent lines, you can run the
zed: open log
command palette action to see the last 1000.No response