Skip to content

completions: Incorrect code produced when completing named imports in .svelte files. #2712

@ieedan

Description

@ieedan

Describe the bug

Currently completing named imports in *.svelte files will add malformed code.

Reproduction

In the script of a *.svelte file begin to type a named import:

import { X } 

Then tab to complete the import.

Notice that the import is malformed:

import { X } from 'y';} // <- extra } 

https://github.com/ieedan/svelte-import-issue-repro

Expected behaviour

Completed import should read:

import { X } from 'y'; 

System Info

  • OS: Windows
  • IDE: VSCode

Which package is the issue about?

svelte-language-server

Additional Information, eg. Screenshots

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    FixedFixed in master branch. Pending production release.bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions