4 ms·
because this is how autocomplete logic works i guess? Frontend cannot guess language and completions for you
by keepo404 28d ago
because this is how autocomplete logic works i guess? Frontend cannot guess language and completions for you
- embedding-shape 28d agoWell, except for the cases when you happen to have the entire VM for your language running in the same tab where you program lives, and they both are all JS. Probably harder, and wouldn't work equally well for everyone, but it would be possible to have "guess language and autocomplete" entirely client-side, especially when it comes to JavaScript of all languages.
- odo1242 28d agoIt seems like the main disadvantage would be that you have to load all the autocomplete data / model weights on the client-side and your webpage might be CPU/memory limited
- embedding-shape 28d ago> main disadvantage would be that you have to load all the autocomplete data / model weights on the client-side Not sure what "model weights" you're talking about, but yes, that is the trade-off. Although complete autocomplete data for the entirely of the JavaScript APIs would be what, in an efficient format, easily below 1MB at least.
- mkgiga 28d agoCode editor autocomplete doesn't use ai — search up LSP
- maxim-fin 28d agoNo autocomplete involved there.
- giancarlostoro 28d agoYeah I remember CodePen refreshing for me plenty of times.
- mkgiga 28d agoyes it can. all you need are some tokenizers for the languages you want to guess and once you derived the language, a few lookup tables to store variable name references in :)