Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I need to restart svelte language server for autoimport to work in new svelte files #2516

Closed
danielo515 opened this issue Sep 25, 2024 · 3 comments
Labels
bug Something isn't working Fixed Fixed in master branch. Pending production release.

Comments

@danielo515
Copy link

Describe the bug

When I create a new svelte component, using typescript as language, I always need to restart the svelte language server in order for automatic imports to work.
Previously it never happened, and just after the restart the automatic imports start to work again.

Reproduction

  1. Create a new svelte file
  2. add a script of lang ts
  3. type the name of a known typescript type/interface
  4. you don't get autoimport suggestions, neither on code actions

Expected behaviour

I want auto imports to work without having to restart svelte server.
I tried this with the minimum amount of extensions and the same problem happens.

System Info

  • OS: MAcOS
  • IDE: VSCODE

Which package is the issue about?

No response

Additional Information, eg. Screenshots

No response

@danielo515 danielo515 added the bug Something isn't working label Sep 25, 2024
@dummdidumm
Copy link
Member

Possibly already fixed by #2488, release pending

dummdidumm pushed a commit that referenced this issue Sep 26, 2024
…rvice (#2518)

#2516

Most of the time, the didOpen request is earlier than the watcher event. So if the file doesn't exist in the GlobalSnapshotManager we manually invoke the project file update check. This won't cause 2 project files check because if the file already is a project file we won't check project files.
@dummdidumm dummdidumm added the Fixed Fixed in master branch. Pending production release. label Sep 26, 2024
@danielo515
Copy link
Author

Can you please ping me when it is released?

@dummdidumm
Copy link
Member

Released

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Fixed Fixed in master branch. Pending production release.
Projects
None yet
Development

No branches or pull requests

2 participants