atom / autocomplete-plus

View and insert possible completions in the editor while typing
MIT License
960 stars 263 forks source link

Specify Order of Autocomplete Typse #1074

Open tylerpashigian opened 4 years ago

tylerpashigian commented 4 years ago

Summary

I would like the option to order the type of autocomplete suggestions. I have created a custom snippet which is working correctly, however it is coming below the list of variables, despite matching the prefix exactly where the variables are less similar. An example is the console.log snippet I made for .source.ts files blow.

'.source.ts': 'Console log sample snippet': 'prefix': 'log' 'body': 'console.log($1)'

You can see in the screenshot below, that this snippet is showing below options that are less similar to the snippet prefix. I would love the ability to order the autocomplete suggestions based on type (variable, snippet, func, etc), especially for things as common as logging. It is strange because the log priority in .source.js files have "console.log" before variables in the autosuggestion list.

Screen Shot 2020-04-11 at 3 41 58 PM

Attempted Workarounds

I have tried utilizing things like suggestionPriority on the snippet definition but I was not seeing any success.