Question: Could Autocomplete suggestions be based on how often you type something? Maybe through machine learning?
Problem: Currently, autocomplete suggests what gets provided by language packages. For example if I type
margin: in a .less file, it suggests some of the possible values that are valid.
But often it will be a number, like
10px. Or a variable like
@spacing. It would be great if autocomplete would suggest that.
Workaround: As a workaround, I started to create snippets that include variables. Autocomplete picks them up and shows them at the top. This lets me just type
ma + enter and it completes to
margin: @spacing;, which is great. But it’s pretty tedious to maintain this manually.
Possible Solution?: Would it be possible to use machine learning to have autocomplete show these more “personal” suggestions? Like after entering
margin: @spacing; many many times, the neural network (or however it’s called) should learn and offer that as the top suggestion.
There are efforts that try to solve this problem, but they are based on everyone’s code. This might work in a lot of cases, but because things like variables wary between projects/users, having suggestions based on what you type most, might result in even better results? It might take a bit longer to “train the machine”, but the longer you do, the better the suggestions become. Or for a head-start your entire commit history on GitHub could be used?