3 ms·
It’s an interesting novelty sometimes, but difficult to get used to, because it often suggests more than a LSP backed autocomplete but it is never guaranteed to
by wryanzimmerman 3y ago
It’s an interesting novelty sometimes, but difficult to get used to, because it often suggests more than a LSP backed autocomplete but it is never guaranteed to be correct (unlike an LSP backed autocomplete which guarantees a certain level of correctness based on your project setup and language).
I have traditional autocomplete and copilot mapped to separate keys in my editor and have learned to treat them separately.
Copilot seems to be best for things like refactoring boilerplate within the same file, where it grabs patterns and can expand them, or if you are working “backwards” like you use a variable and then move up in the file to define it (where the LSP would see the error but won’t help you).
I never let copilot complete more than the end of my current line because I’ve been burned by very sneaky bugs way too often. It’s easier and less error prone to write code than read it.
LSP understands your project but has no idea what you want to do, copilot is like a helpful coworker looking over your shoulder at what you’re doing and suggesting things based on patterns they’ve seen in the past in different projects.