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

Add better autocompletion for namespace components #2247

Closed
kwangure opened this issue Jan 7, 2024 · 1 comment
Closed

Add better autocompletion for namespace components #2247

kwangure opened this issue Jan 7, 2024 · 1 comment

Comments

@kwangure
Copy link

kwangure commented Jan 7, 2024

Description

While writing compound components it's common to group them using name spaces.

Library:

// select.js
export { default as Option } from "./option.svelte";
export { default as Root } from "./select.svelte";

// index.js
export * as Select from "./select.js";

Usage:

<script>
	import { Select } from '$lib/components';
</script>

<Select.Root>
	<Select.Option>1</Select.Option>
	<Select.Option>2</Select.Option>
</Select.Root>

This issue is a request to better support namespace autocomplete for components like Select.

Proposed solution

For example, when using the select component, autocompletion should suggest Root and Option as the only options in the output. ATM the autocompletion list is not even related to the relevant namespace component being typed out.

<Select.Root>
	<!-- 
		Here `|` represents the position of the cursor. 
		Autocomplete should suggest `Option` and `Root` only 
	-->
	<Select.|
</Select.Root>

Alternatives

No response

Additional Information, eg. Screenshots

Autocompletion works fine in the <script/> but not in the markup section.

@jasonlyu123
Copy link
Member

Duplicated of #776. This is a limitation we have.

@jasonlyu123 jasonlyu123 closed this as not planned Won't fix, can't repro, duplicate, stale Jan 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants