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

Not much help with ts code within the html of svelte files #1916

Closed
stemaDev opened this issue Mar 4, 2023 · 1 comment · Fixed by #2631
Closed

Not much help with ts code within the html of svelte files #1916

stemaDev opened this issue Mar 4, 2023 · 1 comment · Fixed by #2631
Labels
limitation Constraints of the existing architecture make this hard to fix

Comments

@stemaDev
Copy link

stemaDev commented Mar 4, 2023

I've been using svelte for a year now, using typescript, vscode and this as a plugin. It's working great apart from one part:
Code completion, code navigation, hover type info is not available in the html too much.
If I'm putting code into curly braces (either it's an if, each or just a simple value to insert), I rarely get code completion (sometimes I get it if I type the first character, cancel completion and reactivate it), there's no info when I hover over it (eg. type), can't navigate to a variable or the definition of a prop, no "right click -> find all references" (I mean there is, but it's not finding anything). Is this a configuration issue, as I was searching a lot before opening this ticket here.

Svelte for VS Code v107.1.2 (but it's been like this for around year for me, never worked)

Everything comes up for code completion, except for the variable created just above, also when I want to use it's properties. No hover information of what type it is, and when I ctrl+click it, it's not navigating anywhere.
image
image
image

Please help, it would make my life much easier. Thank You!

@jasonlyu123
Copy link
Member

We need a reproduction to tell what is the exact problem. But in general, we have some limitations with our current approach. You can see #83 for more info. It won't be fixed anytime soon. But It should work fine If you don't use any custom preprocessor that introduces custom syntax and if you don't have any syntax errors in the template.

@jasonlyu123 jasonlyu123 added the limitation Constraints of the existing architecture make this hard to fix label Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
limitation Constraints of the existing architecture make this hard to fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants