Skip to content

Renaming variable name from "ts" file in VSCode breaks "svelte" file's codes. #1539

@humbleCoder1990

Description

@humbleCoder1990

Describe the bug

svelte-vscode-bug.mov

Reproduction

  1. Create a "writable" variable called "foo", then export it.
  2. Import this variable inside svelte file.
  3. Use this variable with $ directive like $foo.length or class:foo={$foo}
  4. Rename variable to "koo" using "Rename symbol" feature of VSCode

The result is like

"$foo.length" => "$koollength" instead "$koo.length"
"class:foo={$foo} => "class:foo={$koo" (losing right bracket...)

Expected behaviour

I'm really afraid to rename any variable using in ".svelte"

System Info

Lastest MacOS, Lastest VScode

Which package is the issue about?

Svelte for VS Code extension

Additional Information, eg. Screenshots

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    FixedFixed in master branch. Pending production release.bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions