Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

type declaration without ending semicolon last in script block breaks syntax highlighting (again) #2458

Closed
thepuzzlemaster opened this issue Aug 6, 2024 · 1 comment
Labels

Comments

@thepuzzlemaster
Copy link

Describe the bug

I am experiencing the exact same symptoms from #1970

Inside my script tags, if the last line is a type declaration, it breaks syntax highlighting for the rest of the file if there is no semicolon.

Prior bug claimed this was fixed in vscode 1.78
I'm using vscode 1.92.0

This is my first svelte project, so I have no prior history to reference.

Reproduction

component.svelte

<script lang="ts">
  
  type $$Props = {}
</script>

<div>My component</div>
image

Expected behaviour

(but without the semicolon)
image

System Info

  • OS: M1 Max Macbook Pro OS 14.3
  • IDE: VSCode 1.92

Which package is the issue about?

Svelte for VS Code extension

Additional Information, eg. Screenshots

No response

@thepuzzlemaster thepuzzlemaster added the bug Something isn't working label Aug 6, 2024
@jasonlyu123
Copy link
Member

jasonlyu123 commented Aug 7, 2024

This isn't a regression for #1970 but a duplicate of #1110. This is an upstream limitation in https://github.com/microsoft/TypeScript-TmLanguage. VSCode uses TextMate format for syntax highlight, but the format has capability limitations and will likely never be fixed in the upstream repo.

@jasonlyu123 jasonlyu123 closed this as not planned Won't fix, can't repro, duplicate, stale Aug 7, 2024
@jasonlyu123 jasonlyu123 added upstream and removed bug Something isn't working labels Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants