language-tools
language-tools copied to clipboard
Folding the script tag hides its closing tag
When editing .svelte files, the script closing tag </script>
gets hidden by VS Code when I fold it.
It doesn't happen with any other html tag, and it doesn't happen if I switch the file extension to .html.
If I rename script
to anything else, the closing tag shows up:
Does anyone know why? Is there a solution?
ps: My VS Code settings folding strategy is set to "indentation". But switching it to "auto" doesn't solve the problem.
We have special treatment with the script and style tag so that it can be folded without indentation. I don't know if it's possible to show the end tag.
We have special treatment with the script and style tag so that it can be folded without indentation. I don't know if it's possible to show the end tag.
So that must be it, because I realize those other tags (style
and template
) also behave the same way.
Can I remove that special treatment? How do I do it? (I'd like them to behave as the others tags, I use indentation the same way)
Unfortunately it's not possible to remove that special treatment (well, you could go into the folder where the extension is installed, find the JSON file and change it there, but that's not a viable workaround I guess). We are stuck in an either-or-situation here. If we remove the special handling for these three tags, #523 is broken again, which would be worse than living with the minor inconvenience that the folded tags don't show their end tag.
well, you could go into the folder where the extension is installed, find the JSON file and change it there, but that's not a viable workaround I guess
That's what I ended up doing. I guess it would be ideal to give the user an option to decide between showing a closing tag or being able to collapse <style>
tags that have style code that isn't indented. That assumes a user settings can update/change actually disable something in language-configuration.json
...