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

Autocomplete {#snippet _} when within a Component #2499

Open
pauldemarco opened this issue Sep 12, 2024 · 1 comment
Open

Autocomplete {#snippet _} when within a Component #2499

pauldemarco opened this issue Sep 12, 2024 · 1 comment
Labels
limitation Constraints of the existing architecture make this hard to fix

Comments

@pauldemarco
Copy link

pauldemarco commented Sep 12, 2024

Description

Here is a Component Header that takes a snippet title as a prop:

// Header.svelte
let {title}: {title: Snippet} = $props();

It is used like:

<Header>
    {#snippet title()}
        ...
    {/snippet}
</Header>

Proposed solution

It would be nice if the {#snippet _} could autocomplete for all snippets that the Component takes:

<Header>
    {#snippet <Autocomplete shows all my snippet options>}
        ...
    {/snippet}
</Header>

Alternatives

No response

Additional Information, eg. Screenshots

No response

@jasonlyu123
Copy link
Member

There is autocomplete already but with a big caveat, it doesn't work when the name is empty because of #1302 (comment).

@jasonlyu123 jasonlyu123 added the limitation Constraints of the existing architecture make this hard to fix label Sep 13, 2024
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

No branches or pull requests

2 participants