Skip to content
This repository has been archived by the owner on Aug 8, 2020. It is now read-only.

Add assertions completions #7

Merged
merged 2 commits into from Apr 5, 2016

Conversation

kipit
Copy link
Contributor

@kipit kipit commented Mar 8, 2016

This PR provides completions for AVA assertions.

@sindresorhus
Copy link
Member

Shouldn't it be in the same format as the other snippets? Meaning one file per snippet. I don't get the difference between snippets and completions. Would you mind elaborating? :)

@kipit
Copy link
Contributor Author

kipit commented Mar 12, 2016

Hum… That one feels more like an completion than a snippet. The main difference from a user perspective, is the completion choice popping up while user begin to type t.ok. Completion seems a good fit when the trigger belongs to the domain language.

But to be honest, you made me realize that they can be used interchangeably: the result can be the same.

So now, you make me realize that the other ava snippet could be best fit for completion, except for the ava snippet.

@sindresorhus
Copy link
Member

One potential issue with using completion for this is that it won't trigger if the user has turned tab completion off. Snippets will work regardless.

From the default preferences:

    // When enabled, pressing tab will insert the best matching completion.
    // When disabled, tab will only trigger snippets or insert a tab.
    // Shift+tab can be used to insert an explicit tab when tab_completion is
    // enabled.
    "tab_completion": true,

@sindresorhus sindresorhus merged commit 98c2523 into avajs:master Apr 5, 2016
@sindresorhus
Copy link
Member

No reply for a while, so merging for now, but I'd still like to get to the bottom of this. #8

Thanks @kipit :)

@kipit
Copy link
Contributor Author

kipit commented Apr 6, 2016

@sindresorhus my bad :( I've perfectly heard your comment, but I am a bit busy ATM

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants