Skip to content

Code completion for expressions in the markup doesn't work properly #1302

Closed
@aradalvand

Description

@aradalvand

Describe the bug
Code completion in JavaScript expressions in the markup doesn't work (as least as reliably) as it does in the script tag.

To Reproduce
I have a client object that contains various functions that send fetch requests, when I'm in the <script> and I type client and then hit ., this is the list of suggestions that appears, exactly what's expected:
image

But when I do the same thing in an {#await} block, for example, this is the list of suggestions:
image
As you can see, there is all sorts of unrelated stuff in there. I'm assuming this has something to do with this extension or the Svelte language server.
I've had this problem since the beginning, but I always thought "it's probably gonna be fixed soon", and I assumed there was an already-existing issue for it or something.

Expected behavior
I expect to see the members of the client objects properly as they are shown when I do client. in the script tag.

System (please complete the following information):

  • OS: Windows 10
  • IDE: VSCode
  • Plugin/Package: Svelte for VSCode

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinglimitationConstraints of the existing architecture make this hard to fixupstream

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions