Skip to content

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

@jasonlyu123
Copy link
Member

Closing because we went for the "only keyword" route

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.

3 participants