Description
Is your feature request related to a problem? Please describe.
Currently, I cannot do rename refactorings in svelte files.
Describe the solution you'd like
Allow rename refactorings inside svelte files to work so that
- I can change prop names and all dependent files get updated
- I can change variables/functions inside svelte files
- I can change variables/functions outside in js/ts files and if they are used inside svelte files, those are updated aswell
Additional context
I started prototyping this. Renames of variables/functions inside svelte files can be implemented quickly.
However implementing prop renames requires changes to svelte2tsx
. It seems that right now there is no mapping from export let X
to the generated jsx-prop.
Another problem is that when you do a rename inside ts/js, the language server does not pick that up because he is only registered to react to changes of svelte files. To fix that, it would need to register for js/ts files, too, which requires some work to differ between svelte and ts/js documents and not for example run diagnostics of the HTMLPlugin
on js/ts files. Maybe this could come as a second step, after renaming inside svelte files works.