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

Can't find symbols unless *.ts/*.js file is open #2375

Open
shadow-identity opened this issue May 16, 2024 · 2 comments
Open

Can't find symbols unless *.ts/*.js file is open #2375

shadow-identity opened this issue May 16, 2024 · 2 comments
Labels
contributions welcome pull requests for this issue welcome feature request New feature or request

Comments

@shadow-identity
Copy link
Contributor

Describe the bug

There is a known bug / inconvenience in VSCode: if you don't open any *ts/*js files in your project, you can not find symbols defined there using "Go to symbol in workspace..." command.

But when working on Svelte project, having any *.svelte file open is not enough to make the command to work: you always have "no matching symbols" message. You still need to open *.ts file to make it work.

Reproduction

  1. Open VSCode with Svelte plugin enabled
  2. Open any workspace containing svelte files
  3. Open any *.svelte file in editor
  4. Execute "Go to symbol in workspace..." command from the command palette and try to find any existing symbol from your workspace
  5. See that there is no results

Expected behaviour

Open *.svelte file should be treated by VScode as a ts/js file, and should activate JS/TS extension to perform symbol search.

System Info

  • OS: macos 14.4.1 (23E224)
  • IDE: vscode Version: 1.89.0 (Universal)

Which package is the issue about?

Svelte for VS Code extension

Additional Information, eg. Screenshots

image
@shadow-identity shadow-identity added the bug Something isn't working label May 16, 2024
@jasonlyu123 jasonlyu123 added feature request New feature or request and removed bug Something isn't working labels May 16, 2024
@jasonlyu123
Copy link
Member

jasonlyu123 commented May 16, 2024

Marking this as a feature request because we didn't actually have workspace symbol support. What you see is provided by the TypeScript extension. Most of the current TypeScript features for svelte files are also provided by the Svelte extension while The TypeScript extension provides the ts/js features. It is separated, opening a svelte file won't automatically activate the TypeScript extension.

@shadow-identity
Copy link
Contributor Author

Could be convenient to have at least TypeScript extension activated if the Svelte file with script lang=ts is open.

@jasonlyu123 jasonlyu123 added the contributions welcome pull requests for this issue welcome label May 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributions welcome pull requests for this issue welcome feature request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants