atom / ide-typescript

TypeScript and Javascript language support for Atom-IDE
MIT License
368 stars 63 forks source link

Autocomplete prioritizes suggestions over snippets #128

Closed ryanolsonx closed 6 years ago

ryanolsonx commented 6 years ago

Hi,

So I believe that snippets should go first in priority. The default priority for language client is 2 (the same as snippets). In that case, snippets are not always first.

This can definitely be configurable. Also, I'm willing to provide a PR with the implementation.

The key is overriding the suggestionPriority in provideAutocomplete.

provideAutocomplete() {
  return { ...super.provideAutocomplete(), suggestionPriority: 1 };
}

They did this same thing in ide-flowtype (they made theirs configurable). https://github.com/flowtype/ide-flowtype/blob/master/lib/main.js#L122

ryanolsonx commented 6 years ago

PR: https://github.com/atom/ide-typescript/pull/129