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

Find references command create a .vscode/settings.json file in svelte projects #2333

Open
gtm-nayan opened this issue Apr 15, 2024 · 3 comments
Labels
awaiting submitter bug Something isn't working

Comments

@gtm-nayan
Copy link
Contributor

gtm-nayan commented Apr 15, 2024

Describe the bug

Using either of Svelte: Find Component References or Typescript: Find file references commands in a Svelte project creates an empty .vscode/settings.json file.

I haven't been able to replicate in other repos without Svelte files so I think this is specific to the Svelte extension somehow.

Reproduction

pnpm create svelte
pnpm i
Open in vscode
Run the Svelte: Find Component References command
Observe a new file .vscode/settings.json appears with the contents

{
}

Expected behaviour

.vscode/settings.json to not be created

System Info

  • OS: Windows
  • IDE: VSCode

Which package is the issue about?

Svelte for VS Code extension

Additional Information, eg. Screenshots

No response

@gtm-nayan gtm-nayan added the bug Something isn't working label Apr 15, 2024
@jasonlyu123
Copy link
Member

jasonlyu123 commented Apr 15, 2024

Duplicate of #1516. But It should be Svelte: Find file reference that will create an empty setting. The reason is the lack of API to make the reference UI always use the references view (sidebar) instead of peek.

Typescript: Find file references is the ts equivalent of Svelte: Find file reference. TypeScript extension provided this feature and should also have the same problem for non-svelte projects. We adopted the implementation from VSCode so both have the same problem. If your Svelte: Find file reference does have the problem, it might have something to do with your user setting or is caused by another extension.

@dummdidumm
Copy link
Member

@gtm-nayan could you double check if Svelte: Find Component References really creates a file, and if yes, check if this happens if only the Svelte extension is enabled?

@gtm-nayan
Copy link
Contributor Author

gtm-nayan commented Apr 25, 2024

Both the Svelte: and the Typescript: commands create the files for me, the Svelte: command is not available with the extension disabled, but the other one seems to create the file even after I disable the extension and restart VSCode.

I think I missed the file being created in the non-Svelte repo because it was not tracked by git. Oops.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting submitter bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants