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 auto-complete for transition and animate functions #2047

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

navorite
Copy link

@navorite navorite commented Jun 7, 2023

This adds auto-completion for all built-in transition and animate functions.

Could be probably improved by auto-importing the functions on completion? Not sure if it's possible.

@jasonlyu123
Copy link
Member

I am leaning toward only having in:, out:, transition: and even use: here. That would also benefit people with custom transition/animation/action. And if we want to have a complete list. We add that in the CompletionProvider. And add auto-import, possibly with typescript API. Without auto-import, it doesn't save many key-stroke, and I'll still have to go back a few characters to trigger completion/code-action. At least for me, it just feels worse. But that would be way harder to implement thought. @dummdidumm What do you think?

@dummdidumm
Copy link
Member

I agree, we should only have the in: etc prefixes and no specific fully specified names, will probably only get in the way most of the time.

@jasonlyu123
Copy link
Member

Ah. Right. If there is only the directive keyword. We can't rely on dataProvider. vscode-html-language-service would insert ="" after that. We need to do it on our own instead. Like something here https://github.com/sveltejs/language-tools/blob/master/packages/language-server/src/plugins/svelte/features/getCompletions.ts#L59

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

Successfully merging this pull request may close these issues.

None yet

3 participants