language-tools
language-tools copied to clipboard
Autocomplete {#snippet _} when within a Component
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
There is autocomplete already but with a big caveat, it doesn't work when the name is empty because of https://github.com/sveltejs/language-tools/issues/1302#issuecomment-1002358234.