Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Snippet completion before object completion #465

Open
Jaeiya opened this issue May 17, 2015 · 10 comments
Open

Snippet completion before object completion #465

Jaeiya opened this issue May 17, 2015 · 10 comments

Comments

@Jaeiya
Copy link

Jaeiya commented May 17, 2015

I'm actually not sure where this needs to go, either atom-typescript, Atom itself, or here.

Since the update Atom did to v0.199.0 snippet completions come before object completions, which shouldn't be popping up at all in the context of the completion.
image
image

This is particularly annoying because it completely negates proper completions, especially in the second image where it completely hides the info method from being accessible.

Again, I'm not sure if this is an Atom, TypeScript, or Autocomplete issue.
Thanks.

@Jaeiya
Copy link
Author

Jaeiya commented May 19, 2015

TypeStrong/atom-typescript#353 Closes this issue.

@Jaeiya Jaeiya closed this as completed May 19, 2015
@benogle benogle reopened this May 19, 2015
@benogle
Copy link
Contributor

benogle commented May 19, 2015

Reopening as this is an issue with all providers.

Not sure what the best way to mix providers is quite yet.

@Jaeiya
Copy link
Author

Jaeiya commented May 19, 2015

Oh, okay.

@joefitzgerald
Copy link
Contributor

@benogle: This is why we had provider blacklisting 😄. It was removed, for good reason, and to simplify ProviderManager. But we need something more granular than a single priority.

@benogle
Copy link
Contributor

benogle commented May 19, 2015

This is why we had provider blacklisting

We have the equivalent of the blacklisting now with the inclusionPriorities. There is no compositing of separate providers. IMO, this is about mixing them together in a reasonable way, and not about not returning providers results. Every provider will have this issue mixing in with the snippets.

@joefitzgerald
Copy link
Contributor

@benogle the old implementation allowed one provider to explicitly blacklist another provider for the scopes within which it operated. Now, that would have been extremely flakey because it relied on the id field, which was not guaranteed to be unique, and not explicitly required.

But in concept, a provider author might declare its priority to be 1, and the say "except, I should always appear above autocomplete-snippets suggestions".

Even that approach feels dirty though. I think a solution may lie in a combination of the following:

  • Provider priority provides initial ordering of suggestions
  • Selector specificity should then be used
  • Exact matches should priority over fuzzy matches, always
  • Providers should be able to declare conflict with other providers for a specific suggestion request (although: how to identify providers uniquely?)

@bsr203
Copy link

bsr203 commented Jan 21, 2016

+1 really affect usability. The intended behavior is achieved by disabling autocomplete-sippets, but then snippet is not at all shown as a drop down (but snippets work as tab inserts it, but no visual indication) . I wish at least snippet is not show after a dot (mostly in the list of object/class properties) or list at the end in this case.

@elliotaplant
Copy link

elliotaplant commented Oct 4, 2017

I'm running into the exact opposite issue. My snippets appear after my typescript suggestions:

screen shot 2017-10-04 at 12 14 19 pm

Ideally you would be able to either

  • Manually set the priority of the provider (atom-typescript, snippets, etc)
  • Prioritize atom-typescript if the preceding character is a ., else prioritize snippets.

@digitalmaster
Copy link

@elliotaplant Same.. my custom scoped snippet should IMO always take priority.. at the very least when i type all the prefix characters:
image

@iolsen
Copy link

iolsen commented Nov 15, 2017

@leroix want to take a look at this one?

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

No branches or pull requests

9 participants