Closed alcibiadesc closed 10 months ago
Update: if you put a commented script at the end of the svelte document, you will not have the problem, although it is not practical at all
I have the same problem, though it seems like it happens on the last tag in the file in general. It also only happens, if the tag is on a single line.
For example:
<script>
export let data;
</script>
<div>{data}</div> <!-- renaming this causes the issue -->
<script>
export let data;
</script>
<div> <!-- renaming this does not cause the issue -->
{data}
</div>
Wow congrats on finding out that if you put the html above the script, it works, I thought it just didn't work for svelte files.
I confirm I have the same problem. It's totally useless then I am not event sure svelte accepts a script block under the component's body and even if it could, people reading your code wouldn't be very happy about it
Wow congrats on finding out that if you put the html above the script, it works, I thought it just didn't work for svelte files.
I confirm I have the same problem. It's totally useless then I am not event sure svelte accepts a script block under the component's body and even if it could, people reading your code wouldn't be very happy about it
It does, but you shouldn't do it as it's against the coventions.
And prettier automatically formats the component in that way
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Describe the bug The autorename feature of nvim-ts-autotag doesn't work as expected when the HTML is below the script block in Svelte files. The autorename only works correctly when the HTML is above the script block.
To Reproduce Steps to reproduce the behavior:
Expected behavior I expect the corresponding closing tag to get renamed, regardless of whether the HTML block is above or below the script block in Svelte files.
GIF: