vim-svelte-plugin
vim-svelte-plugin copied to clipboard
Syntax highlighting inside <script lang="ts"> sometimes breaks with template strings
Hey there, thank you for maintaining this plugin! The below code seems to break syntax highlighting in everything following the closing curly braces.
<script lang="ts">
const obj = {
err: new Error(`${templateString}`)
};
</script>
It seems that it has to be both inside an object and passed as the constructor to an object for the highlighting to break.

Hi there. Thanks for your feedback.
Actually, it seems to be a bug of TypeScript syntax runtime/syntax/typescriptcommon because I can reproduce it with a .ts file (set filetype=typescript).
Anyway, I fixed it by adding a syntax patch from our side: https://github.com/leafOfTree/vim-svelte-plugin/commit/cee02ddf99afe267ab515e53a1788050861cdd97 Please update this plugin and check if it works
.
I'm closing it. Feel free to reopen it if necessary.